From 16e2cc517430807611c4a54d7f6be1e251ce2a2d Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 13 Jul 2006 22:27:31 +0000 Subject: [PATCH] * src/xml.c: applied patch from Peter Vetere to pass down the UUID from the XML description if present when creating the domain. Daniel --- ChangeLog | 5 +++++ libvirt.spec.in | 2 ++ src/xml.c | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6aea8e9078..18b1919a7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 13 23:33:48 CEST 2006 Daniel Veillard + + * 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 * configure.in libvirt.spec.in docs/* NEWS: preparing release of diff --git a/libvirt.spec.in b/libvirt.spec.in index c48c0a4c5c..3efe780a33 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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 diff --git a/src/xml.c b/src/xml.c index b30c00d292..798f53461f 100644 --- 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)) {