]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix QEMU command building errors to reflect unsupported configuration
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 12 Apr 2010 17:20:31 +0000 (18:20 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 15 Apr 2010 16:55:38 +0000 (17:55 +0100)
Instead of reporting VIR_ERR_INTERNAL_ERROR use the more specific
VIR_ERR_CONFIG_UNSUPPORTED

* src/qemu/qemu_conf.c: Report VIR_ERR_CONFIG_UNSUPPORTED for
  unsupported video adapters

src/qemu/qemu_conf.c

index 03fc29ad329f9214190a7ebbe6f3eac741da99eb..e23b322937383b9b59e1eb4aa647fb4ea709e2eb 100644 (file)
@@ -4407,7 +4407,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
             } else {
                 const char *vgastr = qemuVideoTypeToString(def->videos[0]->type);
                 if (!vgastr || STREQ(vgastr, "")) {
-                    qemuReportError(VIR_ERR_INTERNAL_ERROR,
+                    qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                     _("video type %s is not supported with QEMU"),
                                     virDomainVideoTypeToString(def->videos[0]->type));
                     goto error;
@@ -4433,8 +4433,8 @@ int qemudBuildCommandLine(virConnectPtr conn,
                 break;
 
             default:
-                qemuReportError(VIR_ERR_INTERNAL_ERROR,
-                                _("video type %s is not supported with QEMU"),
+                qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                                _("video type %s is not supported with this QEMU"),
                                 virDomainVideoTypeToString(def->videos[0]->type));
                 goto error;
             }