qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] flush stdout after printing usage()
@ 2009-01-28 18:47 Riku Voipio
  2009-01-28 20:10 ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Riku Voipio @ 2009-01-28 18:47 UTC (permalink / raw)
  To: qemu-devel

testcase:

qemu-arm|grep cpu

Without fflush() getting output from piped qemu is a bit random.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 bsd-user/main.c    |    1 +
 darwin-user/main.c |    1 +
 linux-user/main.c  |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 636f1dc..f3cb3b1 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -351,6 +351,7 @@ static void usage(void)
            interp_prefix,
            x86_stack_size,
            DEBUG_LOGFILE);
+    fflush(stdout);
     _exit(1);
 }
 
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 3edad73..44e8f7c 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -758,6 +758,7 @@ void usage(void)
            interp_prefix,
            stack_size,
            DEBUG_LOGFILE);
+    fflush(stdout);
     _exit(1);
 }
 
diff --git a/linux-user/main.c b/linux-user/main.c
index 3418ca6..9b807e5 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2216,6 +2216,7 @@ static void usage(void)
            interp_prefix,
            x86_stack_size,
            DEBUG_LOGFILE);
+    fflush(stdout);
     _exit(1);
 }
 
-- 
1.5.6.5


-- 
"rm -rf" only sounds scary if you don't have backups

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-06 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28 18:47 [Qemu-devel] [PATCH] flush stdout after printing usage() Riku Voipio
2009-01-28 20:10 ` Anthony Liguori
2009-01-28 21:06   ` Riku Voipio
2009-01-28 21:51     ` Lionel Landwerlin
2009-01-28 22:00       ` Anthony Liguori
2009-02-06 14:33         ` Riku Voipio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).