mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +00:00
QEmu config error handling fixes
* src/qemu_conf.c: applied 2 patches from Guido Guenther to avoid crashes when reading the config file Daniel
This commit is contained in:
parent
5419d0b44d
commit
eecd68364a
@ -1,3 +1,8 @@
|
||||
Wed Feb 6 17:22:34 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/qemu_conf.c: applied 2 patches from Guido Guenther to avoid
|
||||
crashes when reading the config file
|
||||
|
||||
Tue Feb 3 20:26:53 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
Fix new "make distcheck" failures.
|
||||
|
@ -1193,6 +1193,8 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn,
|
||||
} else if (!strcmp((char *)prop, "network")) {
|
||||
def->os.bootDevs[def->os.nBootDevs++] = QEMUD_BOOT_NET;
|
||||
} else {
|
||||
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"unknown boot dev \'%s\'", (char*)prop);
|
||||
goto error;
|
||||
}
|
||||
xmlFree(prop);
|
||||
@ -2523,7 +2525,8 @@ qemudLoadConfig(struct qemud_driver *driver,
|
||||
if (!(def = qemudParseVMDef(NULL, driver, xml, file))) {
|
||||
virErrorPtr err = virGetLastError();
|
||||
qemudLog(QEMUD_WARN, "Error parsing QEMU guest config '%s' : %s",
|
||||
path, err->message);
|
||||
path, err ? err->message :
|
||||
"BUG: unknown error - please report it\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user