diff options
author | Markus Armbruster <armbru@redhat.com> | 2010-02-19 10:30:05 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2010-03-16 17:45:34 +0100 |
commit | aa924ae7306f18f258c48f070c0d06215f157d0f (patch) | |
tree | 39c77b0aa85bf5f9d02cadb47ffb98aa28b3d02d /qemu-error.c | |
parent | ac8dae679498aec6d454926b0b83df27373604e7 (diff) | |
download | qemu-aa924ae7306f18f258c48f070c0d06215f157d0f.tar.gz qemu-aa924ae7306f18f258c48f070c0d06215f157d0f.tar.bz2 qemu-aa924ae7306f18f258c48f070c0d06215f157d0f.zip |
error: New error_printf_unless_qmp()
Diffstat (limited to 'qemu-error.c')
-rw-r--r-- | qemu-error.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qemu-error.c b/qemu-error.c index a8c178b332..5d5fe3742f 100644 --- a/qemu-error.c +++ b/qemu-error.c @@ -41,6 +41,17 @@ void error_printf(const char *fmt, ...) va_end(ap); } +void error_printf_unless_qmp(const char *fmt, ...) +{ + va_list ap; + + if (!monitor_cur_is_qmp()) { + va_start(ap, fmt); + error_vprintf(fmt, ap); + va_end(ap); + } +} + static Location std_loc = { .kind = LOC_NONE }; |