]>
git.proxmox.com Git - qemu.git/blob - qemu-error.c
d20fd0f4d2868417974f6ab31d54f4f0cc6b307a
4 * Copyright (C) 2010 Red Hat Inc.
7 * Markus Armbruster <armbru@redhat.com>,
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
18 * Print to current monitor if we have one, else to stderr.
19 * TODO should return int, so callers can calculate width, but that
20 * requires surgery to monitor_vprintf(). Left for another day.
22 void error_vprintf(const char *fmt
, va_list ap
)
25 monitor_vprintf(cur_mon
, fmt
, ap
);
27 vfprintf(stderr
, fmt
, ap
);
32 * Print to current monitor if we have one, else to stderr.
33 * TODO just like error_vprintf()
35 void error_printf(const char *fmt
, ...)
40 error_vprintf(fmt
, ap
);
44 void qemu_error(const char *fmt
, ...)
49 error_vprintf(fmt
, ap
);
53 void qemu_error_internal(const char *file
, int linenr
, const char *func
,
60 qerror
= qerror_from_info(file
, linenr
, func
, fmt
, &va
);
64 monitor_set_error(cur_mon
, qerror
);