diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-04-28 12:56:33 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-04-28 12:56:34 +0100 |
commit | 13de54eedd40a1b01fa7176dfb96d1c22c5cfa71 (patch) | |
tree | 6662ce703da44cec201298be591d4a263d027999 /util | |
parent | a41b2c995b52b2ce26c171c52ac7dc11c7dccd99 (diff) | |
parent | 0b9f0e2fd7c5070fa06cd6bd5ec69055e3a7d2b1 (diff) |
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
monitor: fix qmp_getfd() fd leak in error case
HMP: support specifying dump format for dump-guest-memory
HMP: fix doc of dump-guest-memory
qmp: object-add: Validate class before creating object
monitor: Add device_add and device_del completion.
monitor: Add command_completion callback to mon_cmd_t.
monitor: Fix drive_del id argument type completion.
error: Remove some unused headers
qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED
qerror.h: Remove QERR defines that are only used once
qerror.h: Remove unused error classes
error: Print error_report() to stderr if using qmp
monitor: Remove unused monitor_print_filename
error: Privatize error_print_loc
vnc: Remove default_mon usage
slirp: Remove default_mon usage
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/error.c | 5 | ||||
-rw-r--r-- | util/qemu-config.c | 2 | ||||
-rw-r--r-- | util/qemu-error.c | 4 | ||||
-rw-r--r-- | util/qemu-option.c | 2 |
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 f6101012c0..bcf0b86f91 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; |