summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdisk.c
diff options
context:
space:
mode:
authorThierry Vignaud2016-07-05 18:39:05 +0200
committerKarel Zak2016-07-14 12:04:04 +0200
commit04c163ed167ee5e28eff923263e0d6132759936c (patch)
tree8a59d6f08a06c6b4044ddee676b60803ca5c8247 /disk-utils/fdisk.c
parentlibblkid: avoid non-empty recursion in EBR (diff)
downloadkernel-qcow2-util-linux-04c163ed167ee5e28eff923263e0d6132759936c.tar.gz
kernel-qcow2-util-linux-04c163ed167ee5e28eff923263e0d6132759936c.tar.xz
kernel-qcow2-util-linux-04c163ed167ee5e28eff923263e0d6132759936c.zip
fdisk: make -l <dev ...> behaves like fdisk -l
aka having the same spacing between disks Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fdisk.c')
-rw-r--r--disk-utils/fdisk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c
index 9dbecf989..7e8285fe9 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;