]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
error: rename error_with_timestamp to message_with_timestamp
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 25 Jan 2021 11:35:06 +0000 (11:35 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 1 Feb 2021 10:50:55 +0000 (10:50 +0000)
The -msg timestamp=on|off option controls whether a timestamp is printed
with error_report() messages. The "-msg" name suggests that this option
has a wider effect than just error_report(). The next patch extends it
to the 'log' trace backend, so rename the variable from
error_with_timestamp to message_with_timestamp.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210125113507.224287-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu/error-report.h
softmmu/vl.c
util/qemu-error.c

index a5ad95ff1bb2cfbc3f0c0a0a5b9ec0a58105e136..9d197daca387cf4f228bb680889372204305d143 100644 (file)
@@ -74,7 +74,7 @@ void error_init(const char *argv0);
 
 const char *error_get_progname(void);
 
-extern bool error_with_timestamp;
+extern bool message_with_timestamp;
 extern bool error_with_guestname;
 extern const char *error_guest_name;
 
index a8876b8965f53f6dec0e1f397d4ada7994eecf5a..bd55468669be0b2dfd8927d27ca05eb6ffbc6759 100644 (file)
@@ -737,7 +737,7 @@ static void realtime_init(void)
 
 static void configure_msg(QemuOpts *opts)
 {
-    error_with_timestamp = qemu_opt_get_bool(opts, "timestamp", false);
+    message_with_timestamp = qemu_opt_get_bool(opts, "timestamp", false);
     error_with_guestname = qemu_opt_get_bool(opts, "guest-name", false);
 }
 
index aa30f03564b90791f8cf9d930615610cb5e6783f..52a9e013c4905ae3e3c5c5451bf1d641b61cd8cf 100644 (file)
@@ -25,7 +25,7 @@ typedef enum {
 } report_type;
 
 /* Prepend timestamp to messages */
-bool error_with_timestamp;
+bool message_with_timestamp;
 bool error_with_guestname;
 const char *error_guest_name;
 
@@ -208,7 +208,7 @@ static void vreport(report_type type, const char *fmt, va_list ap)
     GTimeVal tv;
     gchar *timestr;
 
-    if (error_with_timestamp && !monitor_cur()) {
+    if (message_with_timestamp && !monitor_cur()) {
         g_get_current_time(&tv);
         timestr = g_time_val_to_iso8601(&tv);
         error_printf("%s ", timestr);