partx: don't treat empty partition table as error
PATCH 4/4 partx: don't treat empty partition table as error
If a partition table was detected, but it had no partitions in it, a poorly worded error message was printed and further action halted. For partx -a, this gave an unnecessary error and for partx -u, prevented update from removing all partitions.
Signed-off-by Phillip Susi <[email protected]>
--- partx/partx.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
partx/partx.c +0 -6
@@ -696,12 +696,6 @@ static blkid_partlist get_partlist(blkid_probe pr,printf (_ ("%s: partition table type '%s' detected\n" ), device,blkid_parttable_get_type (tab)); -if (!blkid_partlist_numof_partitions (ls)) { -warnx (_ ("%s: %s partition table does not contains " -"usable partitions" ), device, -blkid_parttable_get_type (tab)); -return NULL ; - }return ls; }
Signature · 1 line
1.7.5.4
Karel Zak
maintainerpartx/partx.c static blkid_partlist get_partlist(blkid_probe pr, · line 704
Quoted 6 lines · Phillip Susi
partx/partx.c +0
-6-if (!blkid_partlist_numof_partitions (ls)) { -warnx (_ ("%s: %s partition table does not contains " -"usable partitions" ), device, -blkid_parttable_get_type (tab)); -return NULL ; - }
I have replaced the warnign and return NULL with message printed in verbose mode only.
Thanks!
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com