diff options
author | Davidlohr Bueso | 2012-05-27 21:43:56 +0200 |
---|---|---|
committer | Karel Zak | 2012-06-06 10:11:22 +0200 |
commit | 89fd812fcbcd8829294bb9b3cf83c723ae4c86bc (patch) | |
tree | 59200b391b71406d60b1ecd52157043f05cd5a68 /fdisk/fdisk.c | |
parent | build-sys: suid su in make install (diff) | |
download | kernel-qcow2-util-linux-89fd812fcbcd8829294bb9b3cf83c723ae4c86bc.tar.gz kernel-qcow2-util-linux-89fd812fcbcd8829294bb9b3cf83c723ae4c86bc.tar.xz kernel-qcow2-util-linux-89fd812fcbcd8829294bb9b3cf83c723ae4c86bc.zip |
fdisk: stop buffering welcome message
Recently, commit 0a86755fe8af1da510d2eca43bdfcd70af098c19 directed the welcome
message output from stderr to stdout breaking regression tests. Correct this
by flushing stdout and stop buffering the output - a trivial function is
created as well.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r-- | fdisk/fdisk.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 12706c27c..084253dbc 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -1984,6 +1984,15 @@ unknown_command(int c) { printf(_("%c: unknown command\n"), c); } +static void print_welcome(void) +{ + printf(_("Welcome to fdisk (%s).\n\n" + "Changes will remain in memory only, until you decide to write them.\n" + "Be careful before using the write command.\n\n"), PACKAGE_STRING); + + fflush(stdout); +} + static void command_prompt(void) { int c; @@ -2211,9 +2220,7 @@ int main(int argc, char **argv) else usage(stderr); - printf(_("Welcome to fdisk (%s).\n\n" - "Changes will remain in memory only, until you decide to write them.\n" - "Be careful before using the write command.\n\n"), PACKAGE_STRING); + print_welcome(); gpt_warning(cxt->dev_path); get_boot(0); |