Check block file existence.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Dec 2007 17:28:59 +0000 (17:28 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Dec 2007 17:28:59 +0000 (17:28 +0000)
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
tools/examples/block

index 2f3a645d7ae3ce1e1192104359f21dbe5c33a1c8..cd7bd78107133d1cdd8962578e96ed4254f96ca7 100644 (file)
@@ -220,6 +220,7 @@ case "$command" in
         # Canonicalise the file, for sharing check comparison, and the mode
         # for ease of use here.
         file=$(readlink -f "$p") || fatal "$p does not exist."
+        test -f "$file" || fatal "$file does not exist."
         mode=$(canonicalise_mode "$mode")
 
         claim_lock "block"