[libvirt] [PATCH] 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 --- src/qemu/qemu_command.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 537e537..b969ecc 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; } -- 1.7.3.2

On 01/21/2011 01:56 AM, Matthias Bolte wrote:
2011/1/21 Osier Yang <jyang@redhat.com>:
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
ACK.
Pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Matthias Bolte
-
Osier Yang