|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Check phy: block device existence
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216381498 -3600
# Node ID 27078831a864c38172587d9abd42b50f81fd6b58
# Parent 0d88b4b86428d2ae6349b261cd6f4fbe94421a4a
Check phy: block device existence
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
tools/examples/block | 8 ++++++++
1 files changed, 8 insertions(+)
diff -r 0d88b4b86428 -r 27078831a864 tools/examples/block
--- a/tools/examples/block Fri Jul 18 12:27:45 2008 +0100
+++ b/tools/examples/block Fri Jul 18 12:44:58 2008 +0100
@@ -209,6 +209,14 @@ case "$command" in
FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
FRONTEND_UUID=$(xenstore_read_default \
"/local/domain/$FRONTEND_ID/vm" 'unknown')
+
+ if [ -L "$dev" ]
+ then
+ dev=$(readlink -f "$dev") || fatal "$dev link does not exist."
+ fi
+ test -e "$dev" || fatal "$dev does not exist."
+ test -b "$dev" || fatal "$dev is not a block device."
+
claim_lock "block"
check_device_sharing "$dev" "$mode"
write_dev "$dev"
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Check phy: block device existence,
Xen patchbot-unstable <=
|
|
|
|
|