diff options
author | Richard Henderson <rth@twiddle.net> | 2016-06-23 19:15:55 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2016-08-05 21:44:40 +0530 |
commit | bdfb460ef77500f7b186759b585f06ff2120929d (patch) | |
tree | 0dad5b3169d975054658d146eb0ffa2fe0454607 /util/log.c | |
parent | c70fbf0a9938baf3b4f843355a77c17a7e945b98 (diff) | |
download | qemu-bdfb460ef77500f7b186759b585f06ff2120929d.zip qemu-bdfb460ef77500f7b186759b585f06ff2120929d.tar.gz qemu-bdfb460ef77500f7b186759b585f06ff2120929d.tar.bz2 |
tcg: Include liveness info in the dumps
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'util/log.c')
-rw-r--r-- | util/log.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -32,15 +32,22 @@ int qemu_loglevel; static int log_append = 0; static GArray *debug_regions; -void qemu_log(const char *fmt, ...) +/* Return the number of characters emitted. */ +int qemu_log(const char *fmt, ...) { - va_list ap; - - va_start(ap, fmt); + int ret = 0; if (qemu_logfile) { - vfprintf(qemu_logfile, fmt, ap); + va_list ap; + va_start(ap, fmt); + ret = vfprintf(qemu_logfile, fmt, ap); + va_end(ap); + + /* Don't pass back error results. */ + if (ret < 0) { + ret = 0; + } } - va_end(ap); + return ret; } static bool log_uses_own_buffers; |