summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2007-01-18 18:38:09 +0000
committerDaniel P. Berrange <berrange@redhat.com>2007-01-18 18:38:09 +0000
commitec329ce9107e0714c2e0df4542ee776abdf06694 (patch)
treee5f6cb994c7849554f99fc3f6022b5696dbf72ba
parent* docs/libvirt.rng: udated for the upcoming KVM and QEmu support (diff)
downloadlibvirt-ec329ce9107e0714c2e0df4542ee776abdf06694.tar.gz
libvirt-ec329ce9107e0714c2e0df4542ee776abdf06694.tar.bz2
libvirt-ec329ce9107e0714c2e0df4542ee776abdf06694.zip
Disable inactive domain drivers on old XenD
-rw-r--r--ChangeLog6
-rw-r--r--src/xend_internal.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index feb884b8a..fde85a12e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jan 18 13:37:02 EST 2007 Daniel Berrange <berrange@redhat.com>
+
+ * src/xend_internal.c: Tweak some of the new inactive domain methods
+ to only run when XenD is >= 3.0.4, so it falls back correctly to
+ the src/xm_internal.c driver.
+
Wed Jan 10 16:20:02 CET 2007 Daniel Veillard <veillard@redhat.com>
* docs/libvirt.rng: udated for the upcoming KVM and QEmu support
diff --git a/src/xend_internal.c b/src/xend_internal.c
index 0c2f34d8d..64b9c9750 100644
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -3127,6 +3127,8 @@ virDomainPtr xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc) {
virXendError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
+ if (conn->xendConfigVersion < 3)
+ return(NULL);
sexpr = virDomainParseXMLDesc(xmlDesc, &name, conn->xendConfigVersion);
if ((sexpr == NULL) || (name == NULL)) {
@@ -3196,6 +3198,9 @@ xenDaemonNumOfDefinedDomains(virConnectPtr conn)
int ret = -1;
struct sexpr *_for_i, *node;
+ if (conn->xendConfigVersion < 3)
+ return(-1);
+
root = sexpr_get(conn, "/xend/domain?state=halted");
if (root == NULL)
goto error;
@@ -3220,6 +3225,9 @@ int xenDaemonListDefinedDomains(virConnectPtr conn, const char **names, int maxn
int ret = -1;
struct sexpr *_for_i, *node;
+ if (conn->xendConfigVersion < 3)
+ return(-1);
+
if ((names == NULL) || (maxnames <= 0))
goto error;
root = sexpr_get(conn, "/xend/domain?state=halted");