From: ghost Date: Mon, 15 Nov 2010 21:09:09 +0000 (+0100) Subject: Merge branch 'bug_617_default_favlist_handling_fix' X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=0a62b65175152c42976d4cb04fb7026d9f910915;hp=9fe4eb3fe26d603650cd2be6ef1fa5c562f0a135 Merge branch 'bug_617_default_favlist_handling_fix' --- diff --git a/data/defaultsatlists.xml b/data/defaultsatlists.xml index 132b427..f8bee5f 100644 --- a/data/defaultsatlists.xml +++ b/data/defaultsatlists.xml @@ -16,7 +16,8 @@ self.disableKeys = True - + + if self.runWizard: self.condition = True diff --git a/data/skin_default.xml b/data/skin_default.xml index 272fdcf..dcd2e8b 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -1205,7 +1205,7 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) Format:%S - + config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean Blink @@ -1221,7 +1221,7 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) Format:%H:%M - + config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean Blink @@ -1253,7 +1253,7 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) Format:%H:%M - + config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean Blink diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py old mode 100755 new mode 100644 index e8e612a..7f83756 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -5,6 +5,10 @@ from SystemInfo import SystemInfo import time from Components.Console import Console +def MajorMinor(path): + rdev = stat(path).st_rdev + return (major(rdev),minor(rdev)) + def readFile(filename): file = open(filename) data = file.read().strip() @@ -125,13 +129,15 @@ class Harddisk: for line in lines: parts = line.strip().split(" ") - if path.realpath(parts[0]).startswith(self.dev_path): - try: + real_path = path.realpath(parts[0]) + if not real_path[-1].isdigit(): + continue + try: + if MajorMinor(real_path) == MajorMinor(self.partitionPath(real_path[-1])): stat = statvfs(parts[1]) - except OSError: - continue - return stat.f_bfree/1000 * stat.f_bsize/1000 - + return stat.f_bfree/1000 * stat.f_bsize/1000 + except OSError: + pass return -1 def numPartitions(self): @@ -168,10 +174,17 @@ class Harddisk: cmd = "umount" - for line in lines: - parts = line.strip().split(" ") - if path.realpath(parts[0]).startswith(self.dev_path): - cmd = ' ' . join([cmd, parts[1]]) + for line in lines: + parts = line.strip().split(" ") + real_path = path.realpath(parts[0]) + if not real_path[-1].isdigit(): + continue + try: + if MajorMinor(real_path) == MajorMinor(self.partitionPath(real_path[-1])): + cmd = ' ' . join([cmd, parts[1]]) + break + except OSError: + pass res = system(cmd) return (res >> 8) @@ -201,10 +214,16 @@ class Harddisk: res = -1 for line in lines: parts = line.strip().split(" ") - if path.realpath(parts[0]) == self.partitionPath("1"): - cmd = "mount -t ext3 " + parts[0] - res = system(cmd) - break + real_path = path.realpath(parts[0]) + if not real_path[-1].isdigit(): + continue + try: + if MajorMinor(real_path) == MajorMinor(self.partitionPath(real_path[-1])): + cmd = "mount -t ext3 " + parts[0] + res = system(cmd) + break + except OSError: + pass return (res >> 8)