aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hotplug/Linux/block-common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hotplug/Linux/block-common.sh')
-rw-r--r--tools/hotplug/Linux/block-common.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/hotplug/Linux/block-common.sh b/tools/hotplug/Linux/block-common.sh
index efedbf50d4..cc374efeb4 100644
--- a/tools/hotplug/Linux/block-common.sh
+++ b/tools/hotplug/Linux/block-common.sh
@@ -112,6 +112,14 @@ same_vm()
"$FRONTEND_UUID")
local target=$(xenstore_read_default "/local/domain/$FRONTEND_ID/target" \
"-1")
- [ "$FRONTEND_UUID" = "$othervm" -o "$target" = "$otherdom" ]
+ local otarget=$(xenstore_read_default "/local/domain/$otherdom/target" \
+ "-1")
+ local otvm=$(xenstore_read_default "/local/domain/$otarget/vm" \
+ "-1")
+ otvm=${otvm%-1}
+ othervm=${othervm%-1}
+ local frontend_uuid=${FRONTEND_UUID%-1}
+
+ [ "$frontend_uuid" = "$othervm" -o "$target" = "$otherdom" -o "$frontend_uuid" = "$otvm" ]
}