git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e26b2ad
)
make DEVICEDB depending on model type
author
Felix Domke
<tmbinc@elitedvb.net>
Mon, 8 Jun 2009 12:18:48 +0000
(14:18 +0200)
committer
Felix Domke
<tmbinc@elitedvb.net>
Mon, 8 Jun 2009 12:18:48 +0000
(14:18 +0200)
lib/python/Components/Harddisk.py
patch
|
blob
|
history
diff --git
a/lib/python/Components/Harddisk.py
b/lib/python/Components/Harddisk.py
index 0d1412481b12404eb485447ca6e7d60ad355e493..18616bf28a6d7872a0ac6b808a4976e82d9a9d4c 100755
(executable)
--- a/
lib/python/Components/Harddisk.py
+++ b/
lib/python/Components/Harddisk.py
@@
-329,19
+329,27
@@
class Partition:
return False
DEVICEDB = \
return False
DEVICEDB = \
+ {"dm8000":
+ {
+ # dm8000:
+ "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0": "Front USB Slot",
+ "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0": "Back, upper USB Slot",
+ "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0": "Back, lower USB Slot",
+ "/devices/platform/brcm-ehci-1.1/usb2/2-1/2-1:1.0/host1/target1:0:0/1:0:0:0": "DVD Drive",
+ },
+ "dm800":
{
{
- # dm8000:
- "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0": "Front USB Slot",
- "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0": "Back, upper USB Slot",
- "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0": "Back, lower USB Slot",
- "/devices/platform/brcm-ehci-1.1/usb2/2-1/2-1:1.0/host1/target1:0:0/1:0:0:0": "DVD Drive",
# dm800:
"/devices/platform/brcm-ehci.0/usb1/1-2/1-2:1.0": "Upper USB Slot",
"/devices/platform/brcm-ehci.0/usb1/1-1/1-1:1.0": "Lower USB Slot",
# dm800:
"/devices/platform/brcm-ehci.0/usb1/1-2/1-2:1.0": "Upper USB Slot",
"/devices/platform/brcm-ehci.0/usb1/1-1/1-1:1.0": "Lower USB Slot",
+ },
+ "dm7025":
+ {
# dm7025:
"/devices/pci0000:00/0000:00:14.1/ide1/1.0": "CF Card Slot", #hdc
"/devices/pci0000:00/0000:00:14.1/ide0/0.0": "Internal Harddisk"
}
# dm7025:
"/devices/pci0000:00/0000:00:14.1/ide1/1.0": "CF Card Slot", #hdc
"/devices/pci0000:00/0000:00:14.1/ide0/0.0": "Internal Harddisk"
}
+ }
class HarddiskManager:
def __init__(self):
class HarddiskManager:
def __init__(self):
@@
-519,7
+527,8
@@
class HarddiskManager:
description = open("/sys" + phys + "/model").read().strip()
except IOError, s:
print "couldn't read model: ", s
description = open("/sys" + phys + "/model").read().strip()
except IOError, s:
print "couldn't read model: ", s
- for physdevprefix, pdescription in DEVICEDB.items():
+ from Tools.HardwareInfo import HardwareInfo
+ for physdevprefix, pdescription in DEVICEDB.get(HardwareInfo().device_name,{}).items():
if phys.startswith(physdevprefix):
description = pdescription
if phys.startswith(physdevprefix):
description = pdescription