]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: Don't overwrite errors from xenconfig
authorJim Fehlig <jfehlig@suse.com>
Wed, 18 Mar 2015 20:53:45 +0000 (14:53 -0600)
committerCole Robinson <crobinso@redhat.com>
Tue, 28 Apr 2015 15:06:42 +0000 (11:06 -0400)
When converting domXML from native, the libxl driver was overwriting
useful errors from the xenconfig parsing code with a useless, generic
error.  E.g. "internal error: parsing xm config failed" vs
"internal error: config value usbdevice was malformed".  Remove the
redundant (and useless) error reporting in the libxl driver.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit bd235cd873f406efac0d5b79c968caa384b8e438)

src/libxl/libxl_driver.c

index ce3a99bf368031c32152b4aea24cf9ff9faf32bd..3252f32226f400a477374e836138b808ac6c3aa3 100644 (file)
@@ -2227,22 +2227,16 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn,
             goto cleanup;
         if (!(def = xenParseXL(conf,
                                cfg->caps,
-                               cfg->verInfo->xen_version_major))) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("parsing xl config failed"));
+                               cfg->verInfo->xen_version_major)))
             goto cleanup;
-        }
     } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) {
         if (!(conf = virConfReadMem(nativeConfig, strlen(nativeConfig), 0)))
             goto cleanup;
 
         if (!(def = xenParseXM(conf,
                                cfg->verInfo->xen_version_major,
-                               cfg->caps))) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("parsing xm config failed"));
+                               cfg->caps)))
             goto cleanup;
-        }
     } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_SEXPR)) {
         /* only support latest xend config format */
         if (!(def = xenParseSxprString(nativeConfig,