]> 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>
Wed, 10 Aug 2016 11:06:46 +0000 (13:06 +0200)
aka having the same spacing between disks

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

index 73d82eb4ca9a556358b869657370946f938e358a..e87524359634ca2164ae8c559a6fe74b27c167b8 100644 (file)
@@ -928,8 +928,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;