]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: make -l <dev ...> behaves like fdisk -l
authorThierry Vignaud <thierry.vignaud@gmail.com>
Tue, 5 Jul 2016 16:39:05 +0000 (18:39 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Jul 2016 10:04:04 +0000 (12:04 +0200)
aka having the same spacing between disks

Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fdisk.c

index 9dbecf9890ead3718a8cd42ab2cf41f9d118cf40..7e8285fe9a8c2302f714710236dc3959e44976d5 100644 (file)
@@ -937,8 +937,13 @@ int main(int argc, char **argv)
 
                if (argc > optind) {
                        int k;
-                       for (k = optind; k < argc; k++)
+                       int ct = 0;
+                       for (k = optind; k < argc; k++) {
+                               if (ct)
+                                   fputs("\n\n", stdout);
+                               ct++;
                                print_device_pt(cxt, argv[k], 1, 0);
+                       }
                } else
                        print_all_devices_pt(cxt, 0);
                break;