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

[Xen-changelog] Read the domid and vifid from the store, rather than horribly slicing up the



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.