qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>
Subject: [Qemu-devel] [PATCH 4/5] global s/fflush(logfile)/qemu_log_flush()/
Date: Tue, 13 Jan 2009 20:42:32 -0200	[thread overview]
Message-ID: <1231886553-4728-5-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1231886553-4728-1-git-send-email-ehabkost@redhat.com>

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 block-raw-posix.c |    2 +-
 exec.c            |    2 +-
 translate-all.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index a856e93..9f0f068 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -68,7 +68,7 @@
 //#define DEBUG_BLOCK
 #if defined(DEBUG_BLOCK)
 #define DEBUG_BLOCK_PRINT(formatCstr, args...) do { if (qemu_log_enabled())	\
-    { qemu_log(formatCstr, ##args); fflush(logfile); } } while (0)
+    { qemu_log(formatCstr, ##args); qemu_log_flush(); } } while (0)
 #else
 #define DEBUG_BLOCK_PRINT(formatCstr, args...)
 #endif
diff --git a/exec.c b/exec.c
index b6201c9..21cfa76 100644
--- a/exec.c
+++ b/exec.c
@@ -1641,7 +1641,7 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
 #else
         log_cpu_state(env, 0);
 #endif
-        fflush(logfile);
+        qemu_log_flush();
         qemu_log_close();
     }
     va_end(ap2);
diff --git a/translate-all.c b/translate-all.c
index 894062a..454ea7a 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -131,7 +131,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
         qemu_log("OUT: [size=%d]\n", *gen_code_size_ptr);
         log_disas(tb->tc_ptr, *gen_code_size_ptr);
         qemu_log("\n");
-        fflush(logfile);
+        qemu_log_flush();
     }
 #endif
     return 0;
-- 
1.5.6.rc3.11.g5f54d

  parent reply	other threads:[~2009-01-13 22:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 22:42 [Qemu-devel] [PATCH 0/5] Logging cleanup, take 3 Eduardo Habkost
2009-01-13 22:42 ` [Qemu-devel] [PATCH 1/5] Clean up debugging code #ifdefs Eduardo Habkost
2009-01-13 22:42 ` [Qemu-devel] [PATCH 2/5] Define macros that will become the new logging API Eduardo Habkost
2009-01-13 22:42 ` [Qemu-devel] [PATCH 3/5] Convert references to logfile/loglevel to use qemu_log*() macros Eduardo Habkost
2009-01-15 21:53   ` [Qemu-devel] " Anthony Liguori
2009-01-15 22:29     ` Eduardo Habkost
2009-01-13 22:42 ` Eduardo Habkost [this message]
2009-01-13 22:42 ` [Qemu-devel] [PATCH 5/5] global s/loglevel & X/qemu_loglevel_mask(X)/ Eduardo Habkost
2009-01-15 22:37   ` [Qemu-devel] " Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1231886553-4728-5-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).