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/fdisk.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/fdisk.c')
-rw-r--r-- | disk-utils/fdisk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 3aa915b2c..3f8769d95 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -367,12 +367,14 @@ int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask, fputs_info(ask, 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); |