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:
parent
3f7429fd2d
commit
8fdd483c53
|
@ -944,12 +944,16 @@ int main(int argc, char **argv)
|
||||||
if (argc > optind) {
|
if (argc > optind) {
|
||||||
int k;
|
int k;
|
||||||
int ct = 0;
|
int ct = 0;
|
||||||
for (k = optind; k < argc; k++) {
|
|
||||||
|
for (rc = 0, k = optind; k < argc; k++) {
|
||||||
if (ct)
|
if (ct)
|
||||||
fputs("\n\n", stdout);
|
fputs("\n\n", stdout);
|
||||||
|
|
||||||
|
rc += print_device_pt(cxt, argv[k], 1, 0);
|
||||||
ct++;
|
ct++;
|
||||||
print_device_pt(cxt, argv[k], 1, 0);
|
|
||||||
}
|
}
|
||||||
|
if (rc)
|
||||||
|
return EXIT_FAILURE;
|
||||||
} else
|
} else
|
||||||
print_all_devices_pt(cxt, 0);
|
print_all_devices_pt(cxt, 0);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue