WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] stubdoms: parse bridge informations

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] stubdoms: parse bridge informations
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 14 Aug 2009 17:47:42 +0100
Delivery-date: Fri, 14 Aug 2009 09:46:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
currently the stubdom-dm script doesn't read the bridge of a vif
on xenstore, therefore all the vifs assigned to the stubdom always
belong to default bridge.
This patch changes the behavior reading the bridge from xenstore and
adding the bridge to the stubdom config file.

It would be nice to have this patch in the 3.4 tree as well.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

diff -r 68e8b8379244 stubdom/stubdom-dm
--- a/stubdom/stubdom-dm        Sun Aug 02 13:43:15 2009 +0100
+++ b/stubdom/stubdom-dm        Fri Aug 14 17:39:53 2009 +0100
@@ -143,11 +143,18 @@
     i=${i%\"}
     i=${i#\"}
     vif_mac=`xenstore-read $i/mac`
+    vif_bridge=`xenstore-read $i/bridge`
     if [ $j -ne 0 ]
     then
         echo -n "," >> ${stubdom_configdir}/$domname-dm
     fi
-    echo -n "'mac=$vif_mac'" >> ${stubdom_configdir}/$domname-dm
+    echo -n "'mac=$vif_mac" >> ${stubdom_configdir}/$domname-dm
+    if [ "$vif_bridge" ]
+    then
+        echo -n ",bridge=$vif_bridge'" >> ${stubdom_configdir}/$domname-dm
+    else
+        echo -n "'" >> ${stubdom_configdir}/$domname-dm
+    fi
     j=$(( $j + 1 ))
 done
 echo " ] " >> ${stubdom_configdir}/$domname-dm

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] stubdoms: parse bridge informations, Stefano Stabellini <=