]> xenbits.xensource.com Git - libvirt.git/commitdiff
* src/xml.c: applied patch from Peter Vetere to pass down the
authorDaniel Veillard <veillard@redhat.com>
Thu, 13 Jul 2006 22:27:31 +0000 (22:27 +0000)
committerDaniel Veillard <veillard@redhat.com>
Thu, 13 Jul 2006 22:27:31 +0000 (22:27 +0000)
  UUID from the XML description if present when creating the domain.
Daniel

ChangeLog
libvirt.spec.in
src/xml.c

index 6aea8e907863f4c9859ad9e120b30f4b3889db9a..18b1919a7a2df543af1a8bf73b663b58b6267b9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 13 23:33:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
+
+       * src/xml.c: applied patch from Peter Vetere to pass down the
+         UUID from the XML description if present when creating the domain.
+
 Tue Jul 11 18:03:51 CEST 2006 Daniel Veillard <veillard@redhat.com>
 
        * configure.in libvirt.spec.in docs/* NEWS: preparing release of
index c48c0a4c5c83f876511e0ccc1ff279aba43bcf0a..3efe780a330bc2e47ec24d857769196b8dc98e28 100644 (file)
@@ -11,8 +11,10 @@ BuildRequires: xen python python-devel
 Requires: xen
 Requires: libxml2
 Requires: readline
+Requires: ncurses
 BuildRequires: libxml2-devel
 BuildRequires: readline-devel
+BuildRequires: ncurses-devel
 Obsoletes: libvir
 ExclusiveArch: i386 x86_64
 
index b30c00d292ab3bcb76d4bfc4af2129daac279616..798f53461fe526b43b374b9215e2a5e32bb1d66a 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1019,6 +1019,13 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
     }
     xmlXPathFreeObject(obj);
 
+    obj = xmlXPathEval(BAD_CAST "string(/domain/uuid[1])", ctxt);
+    if ((obj == NULL) || (obj->type == XPATH_STRING) &&
+        (obj->stringval != NULL) && (obj->stringval[0] != 0)) {
+        virBufferVSprintf(&buf, "(uuid '%s')", obj->stringval);
+    }
+    xmlXPathFreeObject(obj);
+
     obj = xmlXPathEval(BAD_CAST "string(/domain/bootloader[1])", ctxt);
     if ((obj != NULL) && (obj->type == XPATH_STRING) &&
         (obj->stringval != NULL) && (obj->stringval[0] != 0)) {