X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a1e522271eb1a17930cdb0dddf11876e827f49a0..d290a6895aaba9660184b2ac9c1bb90d81ae494c:/lib/python/Components/Harddisk.py diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index b51d7a67..09864fc9 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -103,7 +103,8 @@ class Harddisk: 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" @@ -123,11 +124,12 @@ class Harddisk: return (res >> 8) def createMovieFolder(self): - res = os.system("mkdir /hdd/movie") + res = os.system("mkdir /hdd/movies") return (res >> 8) def initialize(self): - self.unmount() + if self.unmount() != 0: + return -5 if self.createPartition() != 0: return -1