libxl: Don't overwrite errors from xenconfig

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 bd235cd873)
This commit is contained in:
Jim Fehlig 2015-03-18 14:53:45 -06:00 committed by Cole Robinson
parent b10e27ada5
commit bb00c1f9fc

View File

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