X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qemu-error.c;h=4b20d283a2a6e2ea1d62454726de3b7d201f8767;hb=1167bfd63d983eaa4816ee0edb185f98ff070d6d;hp=2eadbfc436303be666bfc3d200383743123f84c7;hpb=6627f64510b622912d35ced2771583e03b1f155f;p=qemu.git diff --git a/qemu-error.c b/qemu-error.c index 2eadbfc43..4b20d283a 100644 --- a/qemu-error.c +++ b/qemu-error.c @@ -12,7 +12,6 @@ #include #include "monitor.h" -#include "sysemu.h" /* * Print to current monitor if we have one, else to stderr. @@ -194,6 +193,8 @@ void error_print_loc(void) /* * Print an error message to current monitor if we have one, else to stderr. + * Format arguments like sprintf(). The result should not contain + * newlines. * Prepend the current location and append a newline. * It's wrong to call this in a QMP monitor. Use qerror_report() there. */ @@ -207,21 +208,3 @@ void error_report(const char *fmt, ...) va_end(ap); error_printf("\n"); } - -void qerror_report_internal(const char *file, int linenr, const char *func, - const char *fmt, ...) -{ - va_list va; - QError *qerror; - - va_start(va, fmt); - qerror = qerror_from_info(file, linenr, func, fmt, &va); - va_end(va); - - if (monitor_cur_is_qmp()) { - monitor_set_error(cur_mon, qerror); - } else { - qerror_print(qerror); - QDECREF(qerror); - } -}