Skip to contentSkip to conversation

xend: fix vscsi error path

PATCH New Christoph Egger 1 participant 1 message Mar 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: fix vscsi error path

Hi,

attached patch fixes xend start problem on non-Linux Dom0 where /proc/mount doesn't exist. The error path was obviously not tested.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
tools/python/xen/util/vscsi_util.py +4 -1
diff -r 633e08774dab tools/python/xen/util/vscsi_util.py
@@ -112,7 +112,10 @@ def _vscsi_get_scsidevices_by_sysfs():
     """ get all scsi devices information by sysfs """
 
     devices = []
-    sysfs_mnt = utils.find_sysfs_mount() 
+    try:
+        sysfs_mnt = utils.find_sysfs_mount() 
+    except:
+        return devices
 
     for dirpath, dirnames, files in os.walk(sysfs_mnt + SYSFS_SCSI_PATH):
         for hctl in dirnames:

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