mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
Improve error reporting in Xen driver SEXPR generation
This commit is contained in:
parent
b2f5ba21b8
commit
3ad8a273b5
@ -1,3 +1,10 @@
|
||||
Wed Apr 1 10:58:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Improve error reporting in SEXPR generation
|
||||
* src/xm_internal.c, src/xend_internal.c: Avoid overwriting
|
||||
previously set error message. Clarify message when network
|
||||
lookup fails
|
||||
|
||||
Wed Apr 1 10:55:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/node_device.c: Fix error message for missing node device
|
||||
|
@ -3850,8 +3850,6 @@ xenDaemonCreateXML(virConnectPtr conn, const char *xmlDesc,
|
||||
return (NULL);
|
||||
|
||||
if (!(sexpr = xenDaemonFormatSxpr(conn, def, priv->xendConfigVersion))) {
|
||||
virXendError(conn, VIR_ERR_XML_ERROR,
|
||||
"%s", _("failed to build sexpr"));
|
||||
virDomainDefFree(def);
|
||||
return (NULL);
|
||||
}
|
||||
@ -5214,7 +5212,7 @@ xenDaemonFormatSxprNet(virConnectPtr conn,
|
||||
char *bridge;
|
||||
|
||||
if (!network) {
|
||||
virXendError(conn, VIR_ERR_NO_SOURCE, "%s",
|
||||
virXendError(conn, VIR_ERR_NO_NETWORK, "%s",
|
||||
def->data.network.name);
|
||||
return -1;
|
||||
}
|
||||
@ -5222,7 +5220,8 @@ xenDaemonFormatSxprNet(virConnectPtr conn,
|
||||
bridge = virNetworkGetBridgeName(network);
|
||||
virNetworkFree(network);
|
||||
if (!bridge) {
|
||||
virXendError(conn, VIR_ERR_NO_SOURCE, "%s",
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("network %s is not active"),
|
||||
def->data.network.name);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1734,11 +1734,8 @@ int xenXMDomainCreate(virDomainPtr domain) {
|
||||
if (!(entry = virHashLookup(priv->configCache, filename)))
|
||||
goto error;
|
||||
|
||||
if (!(sexpr = xenDaemonFormatSxpr(domain->conn, entry->def, priv->xendConfigVersion))) {
|
||||
xenXMError(domain->conn, VIR_ERR_XML_ERROR,
|
||||
"%s", _("failed to build sexpr"));
|
||||
if (!(sexpr = xenDaemonFormatSxpr(domain->conn, entry->def, priv->xendConfigVersion)))
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = xenDaemonDomainCreateXML(domain->conn, sexpr);
|
||||
VIR_FREE(sexpr);
|
||||
|
Loading…
Reference in New Issue
Block a user