aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/error.c5
-rw-r--r--util/qemu-config.c2
-rw-r--r--util/qemu-error.c4
-rw-r--r--util/qemu-option.c2
4 files changed, 5 insertions, 8 deletions
diff --git a/util/error.c b/util/error.c
index f11f1d57a0..2bb42e1c4b 100644
--- a/util/error.c
+++ b/util/error.c
@@ -12,10 +12,7 @@
#include "qemu-common.h"
#include "qapi/error.h"
-#include "qapi/qmp/qjson.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi-types.h"
-#include "qapi/qmp/qerror.h"
+#include "qemu/error-report.h"
struct Error
{
diff --git a/util/qemu-config.c b/util/qemu-config.c
index 60051dfed4..f4e4f38749 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -20,7 +20,7 @@ static QemuOptsList *find_list(QemuOptsList **lists, const char *group,
break;
}
if (lists[i] == NULL) {
- error_set(errp, QERR_INVALID_OPTION_GROUP, group);
+ error_setg(errp, "There is no option group '%s'", group);
}
return lists[i];
}
diff --git a/util/qemu-error.c b/util/qemu-error.c
index fec02c6075..7b167fd06b 100644
--- a/util/qemu-error.c
+++ b/util/qemu-error.c
@@ -20,7 +20,7 @@
*/
void error_vprintf(const char *fmt, va_list ap)
{
- if (cur_mon) {
+ if (cur_mon && !monitor_cur_is_qmp()) {
monitor_vprintf(cur_mon, fmt, ap);
} else {
vfprintf(stderr, fmt, ap);
@@ -165,7 +165,7 @@ const char *error_get_progname(void)
/*
* Print current location to current monitor if we have one, else to stderr.
*/
-void error_print_loc(void)
+static void error_print_loc(void)
{
const char *sep = "";
int i;
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 9d898af443..8bbc3ad4a3 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -819,7 +819,7 @@ QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id,
opts = qemu_opts_find(list, id);
if (opts != NULL) {
if (fail_if_exists && !list->merge_lists) {
- error_set(errp, QERR_DUPLICATE_ID, id, list->name);
+ error_setg(errp, "Duplicate ID '%s' for %s", id, list->name);
return NULL;
} else {
return opts;