* src/xml.c: applied patch from Peter Vetere to pass down the

UUID from the XML description if present when creating the domain.
Daniel
This commit is contained in:
Daniel Veillard 2006-07-13 22:27:31 +00:00
parent 0798941a85
commit 16e2cc5174
3 changed files with 14 additions and 0 deletions

View File

@ -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

View 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

View File

@ -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)) {