From 9201909064500cd836aa07aa5c8c84850a6bd229 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 21 Aug 2007 08:54:07 +0000 Subject: [PATCH] Tue Aug 21 09:45:00 BST 2007 Richard W.M. Jones * src/xend_internal.c: Return the interface device name as in domain XML. * tests/*: Update XML in regression tests. --- ChangeLog | 6 ++++++ src/xend_internal.c | 5 +++++ tests/sexpr2xmldata/sexpr2xml-curmem.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv.xml | 1 + tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 1 + tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 1 + tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 1 + tests/sexpr2xmltest.c | 1 + 13 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5da317c60c..ab6314ba3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Aug 21 09:45:00 BST 2007 Richard W.M. Jones + + * src/xend_internal.c: Return the interface device name as + in domain XML. + * tests/*: Update XML in regression tests. + Tue Aug 21 09:07:00 BST 2007 Richard W.M. Jones * docs/libvir.html: Updated the hvsupport page to show that diff --git a/src/xend_internal.c b/src/xend_internal.c index b77afa8d1a..dfeab67c09 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -1354,6 +1354,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi int max_mem, cur_mem; unsigned char uuid[VIR_UUID_BUFLEN]; char uuidstr[VIR_UUID_STRING_BUFLEN]; + int vif_index = 0; if (root == NULL) { /* ERROR */ @@ -1626,6 +1627,9 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi if (tmp) virBufferVSprintf(&buf, " \n", tmp); + else + virBufferVSprintf(&buf, " \n", + domid, vif_index); tmp = sexpr_node(node, "device/vif/mac"); if (tmp) virBufferVSprintf(&buf, " \n", @@ -1639,6 +1643,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi tmp2); virBufferAdd(&buf, " \n", 17); + vif_index++; } else if (sexpr_lookup(node, "device/vfb")) { /* New style graphics config for PV guests in >= 3.0.4, * or for HVM guests in >= 3.0.5 */ diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml index 8c46e18a84..15853cd827 100644 --- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml +++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml @@ -17,6 +17,7 @@ +