From: Thierry Vignaud Date: Tue, 5 Jul 2016 16:39:05 +0000 (+0200) Subject: fdisk: make -l behaves like fdisk -l X-Git-Tag: v2.29-rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04c163ed167ee5e28eff923263e0d6132759936c;p=thirdparty%2Futil-linux.git fdisk: make -l behaves like fdisk -l aka having the same spacing between disks Signed-off-by: Karel Zak --- diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 9dbecf9890..7e8285fe9a 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -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;