diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2008-07-28 10:58:01 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2008-07-28 10:58:01 +0000 |
| commit | c900a62b068cf1f583b8936aa0dae18c9683b461 (patch) | |
| tree | ec344914b5e677ca19b0d09f008e8d93c6cd3e4b /lib/python | |
| parent | cd019e4b226fc51bfb11d113072dda3ba6013b13 (diff) | |
| download | enigma2-c900a62b068cf1f583b8936aa0dae18c9683b461.tar.gz enigma2-c900a62b068cf1f583b8936aa0dae18c9683b461.zip | |
set hdd standby value for all hdds (not working on hotplug devices,
plugged in while e2 is running)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/Harddisk.py | 6 | ||||
| -rw-r--r-- | lib/python/Components/UsageConfig.py | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 9c695a23..dfc262d8 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -203,6 +203,12 @@ class Harddisk: return -3 return 0 + + def getDeviceDir(self): + return self.devidex + + def getDeviceName(self): + return self.getDeviceDir() + "disc" class Partition: def __init__(self, mountpoint, description = "", force_mounted = False): diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 269d5a2c..d9fb2a55 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -1,3 +1,4 @@ +from Components.Harddisk import harddiskmanager from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet from enigma import Misc_Options, setTunerTypePriorityOrder; from SystemInfo import SystemInfo @@ -60,7 +61,8 @@ def InitUsageConfig(): config.usage.alternatives_priority.addNotifier(TunerTypePriorityOrderChanged) def setHDDStandby(configElement): - os.system("hdparm -S" + configElement.value + " /dev/ide/host0/bus0/target0/lun0/disc") + for hdd in harddiskmanager.HDDList(): + os.system("hdparm -S%s %s" % (configElement.value, hdd[1].getDeviceName())) config.usage.hdd_standby.addNotifier(setHDDStandby) def set12VOutput(configElement): |
