summaryrefslogtreecommitdiffstats
path: root/qemu/util/qemu-error.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/util/qemu-error.c')
-rw-r--r--qemu/util/qemu-error.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/qemu/util/qemu-error.c b/qemu/util/qemu-error.c
index 77ea6c614..1ef35664a 100644
--- a/qemu/util/qemu-error.c
+++ b/qemu/util/qemu-error.c
@@ -10,7 +10,7 @@
* See the COPYING file in the top-level directory.
*/
-#include <stdio.h>
+#include "qemu/osdep.h"
#include "monitor/monitor.h"
#include "qemu/error-report.h"
@@ -200,8 +200,8 @@ static void error_print_loc(void)
bool enable_timestamp_msg;
/*
* Print an error message to current monitor if we have one, else to stderr.
- * Format arguments like vsprintf(). The result should not contain
- * newlines.
+ * Format arguments like vsprintf(). The resulting message should be
+ * a single phrase, with no newline or trailing punctuation.
* Prepend the current location and append a newline.
* It's wrong to call this in a QMP monitor. Use error_setg() there.
*/
@@ -210,7 +210,7 @@ void error_vreport(const char *fmt, va_list ap)
GTimeVal tv;
gchar *timestr;
- if (enable_timestamp_msg) {
+ if (enable_timestamp_msg && !cur_mon) {
g_get_current_time(&tv);
timestr = g_time_val_to_iso8601(&tv);
error_printf("%s ", timestr);
@@ -224,8 +224,8 @@ void error_vreport(const char *fmt, va_list ap)
/*
* Print an error message to current monitor if we have one, else to stderr.
- * Format arguments like sprintf(). The result should not contain
- * newlines.
+ * Format arguments like sprintf(). The resulting message should be a
+ * single phrase, with no newline or trailing punctuation.
* Prepend the current location and append a newline.
* It's wrong to call this in a QMP monitor. Use error_setg() there.
*/