Simplify the Xen domain is persistent driver method

Unconditionally call xenDaemonLookupByUUID, since the XenD
driver must always be present.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-04-30 15:12:47 +01:00
parent e920c5b6c9
commit aead5166a5

View File

@ -702,7 +702,6 @@ xenUnifiedDomainIsPersistent(virDomainPtr dom)
ret = 0; ret = 0;
} else { } else {
/* New Xen with inactive domain management */ /* New Xen with inactive domain management */
if (priv->opened[XEN_UNIFIED_XEND_OFFSET]) {
currdom = xenDaemonLookupByUUID(dom->conn, dom->uuid); currdom = xenDaemonLookupByUUID(dom->conn, dom->uuid);
if (currdom) { if (currdom) {
if (currdom->id == -1) { if (currdom->id == -1) {
@ -714,7 +713,6 @@ xenUnifiedDomainIsPersistent(virDomainPtr dom)
/* If its running there's no official way to tell, so we /* If its running there's no official way to tell, so we
* go behind xend's back & look at the config dir */ * go behind xend's back & look at the config dir */
virUUIDFormat(dom->uuid, uuidstr); virUUIDFormat(dom->uuid, uuidstr);
if (virAsprintf(&path, "%s/%s", XEND_DOMAINS_DIR, uuidstr) < 0) { if (virAsprintf(&path, "%s/%s", XEND_DOMAINS_DIR, uuidstr) < 0) {
virReportOOMError(); virReportOOMError();
@ -727,7 +725,6 @@ xenUnifiedDomainIsPersistent(virDomainPtr dom)
} }
} }
} }
}
done: done:
if (currdom) if (currdom)