Skip to contentSkip to conversation

Allow blktap specification to be a path to a file

PATCH In review Ben Guthro 3 participants 3 messages Aug 27, 2007 – Aug 30, 2007

lore
Share & tools
lore

Ben Guthro

author
#0 lore raw

PATCH 1/1 Allow blktap specification to be a path to a file

Minor change to allow a blktap specification to be an actual path to a file instead of a soft link to a file

tools/examples/blktap +6 -1
diff -r b34eb51bc04c tools/examples/blktap
@@ -18,7 +18,12 @@ then
         p=${p#*:}
     fi
 fi
-file=$(readlink -f "$p") || ebusy "$p does not exist."
+if [ -L "$p" ]; then
+    file=$(readlink -f "$p") || ebusy "$p link does not exist."
+else
+    [ -f "$p" ] || { ebusy "$p file does not exist." }
+	$file="$p"
+fi
 
 if [ "$command" = 'add' ]
 then

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel