summary refs log tree commit diff stats
path: root/util/qemu-error.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-12-19 11:39:20 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-12-19 11:39:21 +0000
commit31b2bd89b915d527ff907e8f3c151585e0c45d4f (patch)
tree10d10d83ee630517834071dfca74ffc02b351eeb /util/qemu-error.c
parentaceeaa69d28e6f08a24395d0aa6915b687d0a681 (diff)
parentd936613547aec49b0b80193cee0b9df05cd8a2ae (diff)
downloadfocaccia-qemu-31b2bd89b915d527ff907e8f3c151585e0c45d4f.tar.gz
focaccia-qemu-31b2bd89b915d527ff907e8f3c151585e0c45d4f.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2019-12-17-v2' into staging
Error reporting patches for 2019-12-17

# gpg: Signature made Wed 18 Dec 2019 07:45:24 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2019-12-17-v2: (35 commits)
  nbd: assert that Error** is not NULL in nbd_iter_channel_error
  hw/vfio/ap: drop local_err from vfio_ap_realize
  backends/cryptodev: drop local_err from cryptodev_backend_complete()
  include/qom/object.h: rename Error ** parameter to more common errp
  hw/usb: rename Error ** parameter to more common errp
  hw/tpm: rename Error ** parameter to more common errp
  hw/sd: drop extra whitespace in sdhci_sysbus_realize() header
  hw/s390x: rename Error ** parameter to more common errp
  monitor/qmp-cmds: rename Error ** parameter to more common errp
  qga: rename Error ** parameter to more common errp
  hw/i386/amd_iommu: rename Error ** parameter to more common errp
  block/snapshot: rename Error ** parameter to more common errp
  hw/core/qdev: cleanup Error ** variables
  9pfs: make Error **errp const where it is appropriate
  ppc: make Error **errp const where it is appropriate
  Revert "ppc: well form kvmppc_hint_smt_possible error hint helper"
  qdev-monitor: make Error **errp const where it is appropriate
  vnc: drop Error pointer indirection in vnc_client_io_error
  hmp: drop Error pointer indirection in hmp_handle_error
  error: make Error **errp const where it is appropriate
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/qemu-error.c')
-rw-r--r--util/qemu-error.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/qemu-error.c b/util/qemu-error.c
index f373f3b3b0..dac7c7dc50 100644
--- a/util/qemu-error.c
+++ b/util/qemu-error.c
@@ -24,6 +24,9 @@ typedef enum {
     REPORT_TYPE_INFO,
 } report_type;
 
+/* Prepend timestamp to messages */
+bool error_with_timestamp;
+
 int error_printf(const char *fmt, ...)
 {
     va_list ap;
@@ -191,7 +194,6 @@ static void print_loc(void)
     }
 }
 
-bool enable_timestamp_msg;
 /*
  * Print a message to current monitor if we have one, else to stderr.
  * @report_type is the type of message: error, warning or informational.
@@ -204,7 +206,7 @@ static void vreport(report_type type, const char *fmt, va_list ap)
     GTimeVal tv;
     gchar *timestr;
 
-    if (enable_timestamp_msg && !cur_mon) {
+    if (error_with_timestamp && !cur_mon) {
         g_get_current_time(&tv);
         timestr = g_time_val_to_iso8601(&tv);
         error_printf("%s ", timestr);