libfstools: partname: several fixes
authorDaniel Golle <daniel@makrotopia.org>
Tue, 2 Mar 2021 17:40:43 +0000 (17:40 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 2 Mar 2021 19:08:05 +0000 (19:08 +0000)
commit19d7d9313d9e868669ae6cb1bf9e840ba2461b41
tree6008b97df2e6ffab22af634d9adae88db58348b8
parentbad1835f27ec31dbc30060b03cc714212275168a
libfstools: partname: several fixes

partname driver didn't allow mount_root to identify the filesystem
and hence the overlay filesystem state remained PENDING which lead
to overlay being cleared again at every reboot.
Fix that by setting v->blk early and, while at it, eliminate unneeded
strdup's by storing the full device paths in a union allowing accessing
the full path or the device name only.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
libfstools/partname.c