diff options
| author | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-08-30 22:31:08 +0000 |
|---|---|---|
| committer | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-08-30 22:31:08 +0000 |
| commit | 1e8da5bf1b50c41eba7b5ec8c10be4762f46015d (patch) | |
| tree | 068cd6b4240cc13c67399806e1fac5f5e0c80249 /lib | |
| parent | 58bb15bea1fb425c5192efe95090f6ff36b6e8d9 (diff) | |
| download | enigma2-1e8da5bf1b50c41eba7b5ec8c10be4762f46015d.tar.gz enigma2-1e8da5bf1b50c41eba7b5ec8c10be4762f46015d.zip | |
added warning (if kill own rootfs)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/Components/Harddisk.py | 2 | ||||
| -rw-r--r-- | lib/python/Screens/HarddiskSetup.py | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index e925acd1..71c03836 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -21,7 +21,7 @@ class Harddisk: self.prochdx = num2prochdx(index) self.devidex = "/dev/ide/host%d/bus%d/target%d/lun0/" % (host, bus, target) - def index(self): + def getIndex(self): return self.index def capacity(self): diff --git a/lib/python/Screens/HarddiskSetup.py b/lib/python/Screens/HarddiskSetup.py index a2b3ed4f..9c7f65e8 100644 --- a/lib/python/Screens/HarddiskSetup.py +++ b/lib/python/Screens/HarddiskSetup.py @@ -3,6 +3,7 @@ from Components.ActionMap import ActionMap from Components.Harddisk import harddiskmanager #global harddiskmanager from Components.MenuList import MenuList from Components.Label import Label +from Screens.MessageBox import MessageBox class HarddiskSetup(Screen): def __init__(self, session, hdd): @@ -14,8 +15,10 @@ class HarddiskSetup(Screen): self["model"] = Label("Model: " + hdd.model()) self["capacity"] = Label(capstr) + + idx = hdd.getIndex() - if hdd.index & 1: + if idx & 1: busstr = "Slave" else: busstr = "Master" @@ -35,7 +38,12 @@ class HarddiskSetup(Screen): }) def hddInitialize(self): - self.hdd.initialize() + if self.hdd.getIndex() == 2: #CF + print "not a good idea!" + self.session.open(MessageBox, "not a good idea - this will kill our rootfs!") + else: + pass + #self.hdd.initialize() class HarddiskSelection(Screen): def __init__(self, session): |
