diff options
author | Karel Zak | 2016-03-10 12:26:43 +0100 |
---|---|---|
committer | Karel Zak | 2016-03-10 12:26:43 +0100 |
commit | 95aae4fcee79958f56c77b934fcbb048ae25f6fb (patch) | |
tree | 3ed4022a8747a8165ba3e48788c57f36bc244520 /disk-utils/sfdisk.c | |
parent | libmount: Typo fix (diff) | |
download | kernel-qcow2-util-linux-95aae4fcee79958f56c77b934fcbb048ae25f6fb.tar.gz kernel-qcow2-util-linux-95aae4fcee79958f56c77b934fcbb048ae25f6fb.tar.xz kernel-qcow2-util-linux-95aae4fcee79958f56c77b934fcbb048ae25f6fb.zip |
sfdisk, fdisk: add fflush()
Let's add fflush(stdout) before we print to stderr to make output
order more deterministic.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/sfdisk.c')
-rw-r--r-- | disk-utils/sfdisk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 3dfdd9e9a..e39037e4e 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -172,12 +172,14 @@ static int ask_callback(struct fdisk_context *cxt __attribute__((__unused__)), fputc('\n', stdout); break; case FDISK_ASKTYPE_WARNX: + fflush(stdout); color_scheme_fenable("warn", UL_COLOR_RED, stderr); fputs(fdisk_ask_print_get_mesg(ask), stderr); color_fdisable(stderr); fputc('\n', stderr); break; case FDISK_ASKTYPE_WARN: + fflush(stdout); color_scheme_fenable("warn", UL_COLOR_RED, stderr); fputs(fdisk_ask_print_get_mesg(ask), stderr); errno = fdisk_ask_print_get_errno(ask); |