From: Osier Yang Date: Fri, 21 Jan 2011 07:20:50 +0000 (+0800) Subject: qemu: report more proper error for unsupported graphics X-Git-Tag: v0.8.8~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af268f2a36be381d2fef79d89ef542425fd2dc7c;p=thirdparty%2Flibvirt.git qemu: report more proper error for unsupported graphics 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 --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 537e5370b9..b969ecc353 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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; }