ia64/xen-unstable

view tools/examples/block-nbd @ 8964:8946b6dcd49e

Fix x86_64 Xen build.

event_callback_cs and failsafe_callback_cs are x86_32 only.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Wed Feb 22 17:26:39 2006 +0000 (2006-02-22)
parents 4f25a6b49445
children b071319927b6
line source
1 #!/bin/sh
3 # Usage: block-nbd [bind server ctl_port |unbind node]
4 #
5 # The node argument to unbind is the name of the device node we are to
6 # unbind.
7 #
8 # This assumes you're running a correctly configured server at the other end!
10 dir=$(dirname "$0")
11 . "$dir/block-common.sh"
13 case "$command" in
14 add)
15 for dev in /dev/nbd*; do
16 if nbd-client $2 $3 $dev; then
17 write_dev $dev
18 exit 0
19 fi
20 done
21 exit 1
22 ;;
23 remove)
24 nbd-client -d $2
25 exit 0
26 ;;
27 esac