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

[Xen-changelog] Read the domid and vifid from the store, rather than hor

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Read the domid and vifid from the store, rather than horribly slicing up the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Dec 2005 19:12:09 +0000
Delivery-date: Mon, 12 Dec 2005 19:13:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID b0b9946ddc426e0e0fa8dee0e7ef7c684c1e4ce1
# Parent  4aa340c5bf6e16152fcaaa6f06f402bd5b38efa5
Read the domid and vifid from the store, rather than horribly slicing up the
store path.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 4aa340c5bf6e -r b0b9946ddc42 tools/examples/vif-nat
--- a/tools/examples/vif-nat    Mon Dec 12 16:48:24 2005
+++ b/tools/examples/vif-nat    Mon Dec 12 17:13:38 2005
@@ -42,8 +42,8 @@
 fi
 
 
-domid=$(echo "$XENBUS_PATH" | sed -n 's#.*/\([0-9]*\)/[0-9]*$#\1#p')
-vifid=$(echo "$XENBUS_PATH" | sed -n 's#.*/[0-9]*/\([0-9]*\)$#\1#p')
+domid=$(xenstore_read "$XENBUS_PATH/frontend-id")
+vifid=$(xenstore_read "$XENBUS_PATH/handle")
 vifid=$(( $vifid + 1 ))
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Read the domid and vifid from the store, rather than horribly slicing up the, Xen patchbot -unstable <=