[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/7] Fix network device inconsistency between xm and sxpr



xenDaemonFormatSxpr() adds (type ioemu) only if xendConfigVersion < 4.
xenXMDomainConfigFormatNet() adds type=ioemu always.  Change it make
it consistent with xenDaemonFormatSxpr().

Signed-off-by: Markus Armbruster <armbru redhat com>
---
 src/xm_internal.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/xm_internal.c b/src/xm_internal.c
index 77aa3e1..b3be199 100644
--- a/src/xm_internal.c
+++ b/src/xm_internal.c
@@ -1808,6 +1808,7 @@ static int xenXMDomainConfigFormatNet(virConnectPtr conn,
     virBuffer buf = VIR_BUFFER_INITIALIZER;
     virConfValuePtr val, tmp;
     char *str;
+    xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData;
 
     virBufferVSprintf(&buf, "mac=%02x:%02x:%02x:%02x:%02x:%02x",
                       net->mac[0], net->mac[1],
@@ -1836,7 +1837,7 @@ static int xenXMDomainConfigFormatNet(virConnectPtr conn,
         goto cleanup;
     }
 
-    if (hvm)
+    if (hvm && priv->xendConfigVersion < 4)
         virBufferAddLit(&buf, ",type=ioemu");
 
     if (net->model)
-- 
1.5.4.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]