From: Karel Zak Date: Thu, 30 Jul 2015 11:22:35 +0000 (+0200) Subject: sfdisk: don't print extra linebreaks on --quiet X-Git-Tag: v2.27-rc1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=901f85fe546572a35bba5cb79479ce549377179f;p=thirdparty%2Futil-linux.git sfdisk: don't print extra linebreaks on --quiet Signed-off-by: Karel Zak --- diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c index 7d3c219db1..2e491ca41b 100644 --- a/disk-utils/fdisk-list.c +++ b/disk-utils/fdisk-list.c @@ -166,7 +166,7 @@ void list_disklabel(struct fdisk_context *cxt) /* print */ if (!scols_table_is_empty(out)) { - fputc('\n', stdout); + fdisk_info(cxt, ""); /* just line break */ scols_print_table(out); } @@ -177,7 +177,7 @@ void list_disklabel(struct fdisk_context *cxt) continue; if (!fdisk_lba_is_phy_aligned(cxt, fdisk_partition_get_start(pa))) { if (!post) - fputc('\n', stdout); + fdisk_info(cxt, ""); /* line break */ fdisk_warnx(cxt, _("Partition %zu does not start on physical sector boundary."), fdisk_partition_get_partno(pa) + 1); post++; @@ -186,7 +186,7 @@ void list_disklabel(struct fdisk_context *cxt) if (fdisk_table_wrong_order(tb)) { if (!post) - fputc('\n', stdout); + fdisk_info(cxt, ""); /* line break */ fdisk_info(cxt, _("Partition table entries are not in disk order.")); } done: @@ -280,7 +280,7 @@ void list_freespace(struct fdisk_context *cxt) /* print */ if (!scols_table_is_empty(out)) { - fputc('\n', stdout); + fdisk_info(cxt, ""); /* line break */ scols_print_table(out); } done: