self.prochdx = num2prochdx(index)
self.devidex = "/dev/ide/host%d/bus%d/target%d/lun0/" % (host, bus, target)
+ def index(self):
+ return self.index
+
def capacity(self):
procfile = tryOpen(self.prochdx + "capacity")
if hddNum > 8:
break
-
+
def HDDList(self):
list = [ ]
for hd in self.hdd:
cap = hd.capacity() / 1000 * 512 / 1000
+ print cap
hdd = hd.model() + " ("
if hd.index & 1:
hdd += "slave"
else:
hdd += "master"
if cap > 0:
- hdd += ", %d,%d GB" % (cap/1024, cap%1024)
+ hdd += ", %d.%03d GB" % (cap/1024, cap%1024)
hdd += ")"
print hdd
list.append((hdd, hd))
return list
+
+
+harddiskmanager = HarddiskManager()
+
+