summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-12-16 21:11:37 +0000
committerMike Fulbright <msf@redhat.com>2002-12-16 21:11:37 +0000
commitfbd43c8b0d44dbf304aa7df9174511ba7013e06c (patch)
tree9fe81226a5a20e2deacccfd3b6af24ecbf72f1d1 /isys
parentb9ad7d444167286b6171e8039287c4bab8619e43 (diff)
downloadanaconda-fbd43c8b0d44dbf304aa7df9174511ba7013e06c.tar.gz
anaconda-fbd43c8b0d44dbf304aa7df9174511ba7013e06c.tar.xz
anaconda-fbd43c8b0d44dbf304aa7df9174511ba7013e06c.zip
filter out USB and IEEE1394 storage devices as removable too
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 597e31f3d..167e18564 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -434,6 +434,27 @@ def driveIsRemovable(device):
else:
makeDevInode(device, "/tmp/disk")
rc = (_isys.isScsiRemovable("/tmp/disk") == 1)
+
+ # need to test if its USB or IEEE1394 even if it doesnt look removable
+ if not rc:
+ if os.access("/tmp/scsidisks", os.R_OK):
+ sdlist=open("/tmp/scsidisks", "r")
+ sdlines = sdlist.readlines()
+ sdlist.close()
+ for l in sdlines:
+ try:
+ # each line has format of: <device> <module>
+ (sddev, sdmod) = string.split(l)
+
+ if sddev == device:
+ if sdmod in ['sbp2', 'usb-storage']:
+ rc = 1
+ else:
+ rc = 0
+ break
+ except:
+ pass
+
os.unlink("/tmp/disk")
return rc