mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
Fixed handling of unsupported machine types
This commit is contained in:
parent
86d352d4fe
commit
f7dd6b4d6f
@ -1,3 +1,8 @@
|
||||
Mon Jul 30 14:40:23 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/qemu_conf.c: Validate requested architecture and reject
|
||||
unsupported ones
|
||||
|
||||
Mon Jul 30 12:15:43 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: add report of ACPI/APIC for Xen fully virt,
|
||||
|
@ -1102,6 +1102,10 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn,
|
||||
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
|
||||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
|
||||
const char *defaultMachine = qemudDefaultMachineForArch(def->os.arch);
|
||||
if (!defaultMachine) {
|
||||
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "unsupported arch %s", def->os.arch);
|
||||
goto error;
|
||||
}
|
||||
if (strlen(defaultMachine) >= (QEMUD_OS_MACHINE_MAX_LEN-1)) {
|
||||
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "machine type too long");
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user