|
Daniel Veillard |
cbe377 |
diff -rup libvirt-0.3.1.orig/src/qemu_conf.c libvirt-0.3.1.new/src/qemu_conf.c
|
|
Daniel Veillard |
cbe377 |
--- libvirt-0.3.1.orig/src/qemu_conf.c 2007-07-24 11:06:38.000000000 -0400
|
|
Daniel Veillard |
cbe377 |
+++ libvirt-0.3.1.new/src/qemu_conf.c 2007-07-26 10:22:09.000000000 -0400
|
|
Daniel Veillard |
cbe377 |
@@ -1088,6 +1088,10 @@ static struct qemud_vm_def *qemudParseXM
|
|
Daniel Veillard |
cbe377 |
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
|
|
Daniel Veillard |
cbe377 |
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
|
|
Daniel Veillard |
cbe377 |
const char *defaultMachine = qemudDefaultMachineForArch(def->os.arch);
|
|
Daniel Veillard |
cbe377 |
+ if (!defaultMachine) {
|
|
Daniel Veillard |
cbe377 |
+ qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "unsupported arch %s", def->os.arch);
|
|
Daniel Veillard |
cbe377 |
+ goto error;
|
|
Daniel Veillard |
cbe377 |
+ }
|
|
Daniel Veillard |
cbe377 |
if (strlen(defaultMachine) >= (QEMUD_OS_MACHINE_MAX_LEN-1)) {
|
|
Daniel Veillard |
cbe377 |
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "machine type too long");
|
|
Daniel Veillard |
cbe377 |
goto error;
|