提交 f7dd6b4d 编写于 作者: D Daniel P. Berrange

Fixed handling of unsupported machine types

上级 86d352d4
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> 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, * 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, ...@@ -1102,6 +1102,10 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn,
if ((obj == NULL) || (obj->type != XPATH_STRING) || if ((obj == NULL) || (obj->type != XPATH_STRING) ||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) { (obj->stringval == NULL) || (obj->stringval[0] == 0)) {
const char *defaultMachine = qemudDefaultMachineForArch(def->os.arch); 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)) { if (strlen(defaultMachine) >= (QEMUD_OS_MACHINE_MAX_LEN-1)) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "machine type too long"); qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "machine type too long");
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册