aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-02-16 09:28:39 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-02-16 09:28:39 +0000
commit79f5cb24ab1230bbcfb61add37fab43b537195bf (patch)
tree1f8d953d0a832c6e1b4ac517fb100179af11cd9a
parent8a85ee5b553427d80bb959697ff1e8f382e9594b (diff)
downloadxen-79f5cb24ab1230bbcfb61add37fab43b537195bf.tar.gz
xen-79f5cb24ab1230bbcfb61add37fab43b537195bf.tar.bz2
xen-79f5cb24ab1230bbcfb61add37fab43b537195bf.zip
hotplug: ignore xenstore-read error
The failure to read "backend/tap/<domid>/*" in the xenstore is a usual case since the domain is gone after xenstore-ls command is executed. The error should be ignored. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
-rw-r--r--tools/hotplug/Linux/blktap4
-rw-r--r--tools/hotplug/Linux/block2
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/hotplug/Linux/blktap b/tools/hotplug/Linux/blktap
index 01a0f6c6da..eb2e8b1941 100644
--- a/tools/hotplug/Linux/blktap
+++ b/tools/hotplug/Linux/blktap
@@ -23,7 +23,7 @@ check_blktap_sharing()
do
for dev in $(xenstore-list "$base_path/$dom")
do
- params=$(xenstore_read "$base_path/$dom/$dev/params" | cut -d: -f2)
+ params=$(xenstore_read_default "$base_path/$dom/$dev/params" "" | cut -d: -f2)
if [ "$file" = "$params" ]
then
@@ -35,7 +35,7 @@ check_blktap_sharing()
return
fi
else
- local m=$(xenstore_read "$base_path/$dom/$dev/mode")
+ local m=$(xenstore_read_default "$base_path/$dom/$dev/mode" "")
m=$(canonicalise_mode "$m")
if [ "$m" = 'w' ]
diff --git a/tools/hotplug/Linux/block b/tools/hotplug/Linux/block
index f22a194649..ff85bcb433 100644
--- a/tools/hotplug/Linux/block
+++ b/tools/hotplug/Linux/block
@@ -100,7 +100,7 @@ check_sharing()
return
fi
else
- local m=$(xenstore_read "$base_path/$dom/$dev/mode")
+ local m=$(xenstore_read_default "$base_path/$dom/$dev/mode" "")
m=$(canonicalise_mode "$m")
if [ "$m" = 'w' ]