repart: deal with empty partition label sensibly
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Mar 2021 21:45:15 +0000 (22:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 May 2021 12:51:08 +0000 (14:51 +0200)
commitb3b84982d0e72d3160ff7ecb6193c6439c1fc27e
tree86c82dcd1ffaffbc3c0630a79777ce2b0ed2d38e
parentda72383bf769e83af7ba94d51dad8ac62b5754eb
repart: deal with empty partition label sensibly

libfdisk appears to return NULL when encountering an empty partition
label, let's handle this sanely, and treat NULL and "" for the current
label as the same, but for the new label as distinct: there NULL means
nothing is set, and "" means an actual empty label.

(cherry picked from commit be9ce0188ebb414319f0c003f805ea02b5eb473e)
src/partition/repart.c