]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: report more proper error for unsupported graphics
authorOsier Yang <jyang@redhat.com>
Fri, 21 Jan 2011 07:20:50 +0000 (15:20 +0800)
committerEric Blake <eblake@redhat.com>
Fri, 21 Jan 2011 16:27:15 +0000 (09:27 -0700)
Report VIR_ERR_CONFIG_UNSUPPORTED instead of VIR_ERR_INTERNAL_ERROR,
as it's valid in our domain schema, just unsupported by hypervisor
here.

* src/qemu/qemu_command.c

src/qemu/qemu_command.c

index 537e5370b9419998af2f07e8d5d24dd8c6b31e79..b969ecc35354b81882734890a5f62459f05949b3 100644 (file)
@@ -3702,9 +3702,9 @@ qemuBuildCommandLine(virConnectPtr conn,
         virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=spice");
 
     } else if ((def->ngraphics == 1)) {
-        qemuReportError(VIR_ERR_INTERNAL_ERROR,
-                    _("unsupported graphics type '%s'"),
-                    virDomainGraphicsTypeToString(def->graphics[0]->type));
+        qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                        _("unsupported graphics type '%s'"),
+                        virDomainGraphicsTypeToString(def->graphics[0]->type));
         goto error;
     }