repart: deal with empty partition label sensibly
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Mar 2021 21:45:15 +0000 (22:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 19 Apr 2021 21:16:02 +0000 (23:16 +0200)
commitbe9ce0188ebb414319f0c003f805ea02b5eb473e
treeebc7d6c9f697a910130eafb0bd5bd875f5962857
parent22163eb51b682afe969f9381d56315dade874ec1
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.
src/partition/repart.c