blob: 4ed5dce9cfbe6ad18be90d0b5785d84a424f9f80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/python
import _isys
p = _isys.ProbedList()
p.updateNet()
p.updateIde()
p.updateScsi()
i = 0
print "found devices:"
#while (i < len(p)):
# print "\t", p[i]
# i = i + 1
print len (p)
for i in p:
print "\t", i
print "Removable test"
for (dclass, path, comment) in p:
# print "IDE Test-> ",path,_isys.isIdeRemovable("/dev/"+path)
# print "SCSI Test-> ",path,_isys.isScsiRemovable("/dev/"+path)
import isys
if dclass != 'net':
print path, isys.driveIsRemovable(path)
|