Check phy: block device existence

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
Keir Fraser committed 2008-07-18 12:44:58 +01:00
1 parent ebf6792935
commit cd3b21408f
1 file changed
+8
+8
View File
@@ -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"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.