xen/21129-xen-hotplug-cleanup.patch

23 lines
914 B
Diff

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1271053401 -3600
# Node ID bf74d9c31674c9001a7c4aa8d93227552edf53b1
# Parent b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6
blktap2: a little fix to xen-hotplug-cleanup
Signed-off-by: James (Song Wei) <jsong@novell.com>
Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup
===================================================================
--- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-hotplug-cleanup
+++ xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup
@@ -21,7 +21,7 @@ if [ "$vm" != "" ]; then
# if the vm path does not exist and the device class is 'vbd' then we may have
# a tap2 device
- if [ $(xenstore-read "$vm_dev" 2>/dev/null) != "" ] \
+ if [ "$(xenstore-read "$vm_dev" 2>/dev/null)" != "" ] \
&& [ "${path_array[1]}" = "vbd" ]; then
vm_dev="$vm/device/tap2/${path_array[3]}"
fi