fdisk: don't be silent when list non-existing device

Addresses: https://github.com/karelzak/util-linux/issues/376
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2016-12-13 12:11:18 +01:00
parent 3f7429fd2d
commit 8fdd483c53
1 changed files with 6 additions and 2 deletions

View File

@ -944,12 +944,16 @@ int main(int argc, char **argv)
if (argc > optind) {
int k;
int ct = 0;
for (k = optind; k < argc; k++) {
for (rc = 0, k = optind; k < argc; k++) {
if (ct)
fputs("\n\n", stdout);
rc += print_device_pt(cxt, argv[k], 1, 0);
ct++;
print_device_pt(cxt, argv[k], 1, 0);
}
if (rc)
return EXIT_FAILURE;
} else
print_all_devices_pt(cxt, 0);
break;