git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove Upgrade plugin
[enigma2.git]
/
lib
/
python
/
Components
/
Harddisk.py
diff --git
a/lib/python/Components/Harddisk.py
b/lib/python/Components/Harddisk.py
index a638977061674e19ef18aa7fde4754fbe4c1f7b7..37e957e41db8658d4980deec6acc1ce2849f70ae 100644
(file)
--- a/
lib/python/Components/Harddisk.py
+++ b/
lib/python/Components/Harddisk.py
@@
-1,5
+1,7
@@
import os
import os
+from Tools.Directories import *
+
def tryOpen(filename):
try:
procFile = open(filename)
def tryOpen(filename):
try:
procFile = open(filename)
@@
-103,7
+105,8
@@
class Harddisk:
def unmount(self):
cmd = "/bin/umount " + self.devidex + "part*"
def unmount(self):
cmd = "/bin/umount " + self.devidex + "part*"
- os.system(cmd)
+ res = os.system(cmd)
+ return (res >> 8)
def createPartition(self):
cmd = "/sbin/sfdisk -f " + self.devidex + "disc"
def createPartition(self):
cmd = "/sbin/sfdisk -f " + self.devidex + "disc"
@@
-123,9
+126,11
@@
class Harddisk:
return (res >> 8)
def createMovieFolder(self):
return (res >> 8)
def createMovieFolder(self):
- res = os.system("mkdir
/hdd/movie"
)
+ res = os.system("mkdir
" + resolveFilename(SCOPE_HDD)
)
return (res >> 8)
return (res >> 8)
+ errorList = [ _("Everything is fine"), _("Creating partition failed"), _("Mkfs failed"), _("Mount failed"), _("Create movie folder failed"), _("Unmount failed")]
+
def initialize(self):
self.unmount()
def initialize(self):
self.unmount()
@@
-169,6
+174,12
@@
class HarddiskManager:
if hddNum > 8:
break
if hddNum > 8:
break
+ def HDDCount(self):
+ cnt = 0
+ for hd in self.hdd:
+ cnt = cnt + 1
+ return cnt
+
def HDDList(self):
list = [ ]
for hd in self.hdd:
def HDDList(self):
list = [ ]
for hd in self.hdd: