mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Fix qemudReportError.
* src/qemu_conf.c: applied patch from Cole Robinson to use virErrorMsg in qemudReportError. Daniel
This commit is contained in:
parent
26e12450bb
commit
004ff90483
@ -1,3 +1,8 @@
|
|||||||
|
Thu Feb 28 12:16:39 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/qemu_conf.c: applied patch from Cole Robinson to use virErrorMsg
|
||||||
|
in qemudReportError.
|
||||||
|
|
||||||
Wed Feb 27 20:21:35 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
Wed Feb 27 20:21:35 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/bridge.c, src/bridge.h, src/qemu_conf.c: Set mac address
|
* src/bridge.c, src/bridge.h, src/qemu_conf.c: Set mac address
|
||||||
|
@ -58,6 +58,7 @@ void qemudReportError(virConnectPtr conn,
|
|||||||
int code, const char *fmt, ...) {
|
int code, const char *fmt, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
char errorMessage[QEMUD_MAX_ERROR_LEN];
|
char errorMessage[QEMUD_MAX_ERROR_LEN];
|
||||||
|
const char *virerr;
|
||||||
|
|
||||||
if (fmt) {
|
if (fmt) {
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -66,8 +67,10 @@ void qemudReportError(virConnectPtr conn,
|
|||||||
} else {
|
} else {
|
||||||
errorMessage[0] = '\0';
|
errorMessage[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage[0] : NULL));
|
||||||
__virRaiseError(conn, dom, net, VIR_FROM_QEMU, code, VIR_ERR_ERROR,
|
__virRaiseError(conn, dom, net, VIR_FROM_QEMU, code, VIR_ERR_ERROR,
|
||||||
NULL, NULL, NULL, -1, -1, "%s", errorMessage);
|
virerr, errorMessage, NULL, -1, -1, virerr, errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
||||||
|
Loading…
Reference in New Issue
Block a user