ia64/xen-unstable

changeset 8327:b0b9946ddc42

Read the domid and vifid from the store, rather than horribly slicing up the
store path.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Mon Dec 12 17:13:38 2005 +0000 (2005-12-12)
parents 4aa340c5bf6e
children aebe8f5c7069 fa5dddabda0c
files tools/examples/vif-nat
line diff
     1.1 --- a/tools/examples/vif-nat	Mon Dec 12 16:48:24 2005 +0000
     1.2 +++ b/tools/examples/vif-nat	Mon Dec 12 17:13:38 2005 +0000
     1.3 @@ -42,8 +42,8 @@ then
     1.4  fi
     1.5  
     1.6  
     1.7 -domid=$(echo "$XENBUS_PATH" | sed -n 's#.*/\([0-9]*\)/[0-9]*$#\1#p')
     1.8 -vifid=$(echo "$XENBUS_PATH" | sed -n 's#.*/[0-9]*/\([0-9]*\)$#\1#p')
     1.9 +domid=$(xenstore_read "$XENBUS_PATH/frontend-id")
    1.10 +vifid=$(xenstore_read "$XENBUS_PATH/handle")
    1.11  vifid=$(( $vifid + 1 ))
    1.12  
    1.13