Fix networking in paravirt guests

This commit is contained in:
Daniel P. Berrange 2006-08-18 20:20:50 +00:00
parent adec25590c
commit 129a24ea8c
2 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,8 @@
Thu Aug 18 15:22:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xml.c: fix networking in paravirt guests - only set the
'(type ioemu)' option for HVM.
Thu Aug 17 19:42:50 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xml.c: fix virParseUUID()

View File

@ -967,7 +967,7 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
* Returns 0 in case of success, -1 in case of error.
*/
static int
virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
{
xmlNodePtr cur;
xmlChar *type = NULL;
@ -1016,6 +1016,7 @@ virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
}
if (script != NULL)
virBufferVSprintf(buf, "(script '%s')", script);
if (hvm)
virBufferAdd(buf, "(type ioemu)", 12);
virBufferAdd(buf, ")", 1);
@ -1210,8 +1211,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
virBufferAdd(&buf, "(device ", 8);
res =
virDomainParseXMLIfDesc(obj->nodesetval->nodeTab[i], &buf);
res = virDomainParseXMLIfDesc(obj->nodesetval->nodeTab[i], &buf, hvm);
if (res != 0) {
goto error;
}