git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dont add cmd to arglist
[enigma2.git]
/
lib
/
python
/
Components
/
Harddisk.py
diff --git
a/lib/python/Components/Harddisk.py
b/lib/python/Components/Harddisk.py
index 9c695a231c14d3761f9a775ce358fc03c9b04394..f7c3a7cb4ffdbf22f884eb4ef16b709f11aaf2b6 100644
(file)
--- a/
lib/python/Components/Harddisk.py
+++ b/
lib/python/Components/Harddisk.py
@@
-203,6
+203,12
@@
class Harddisk:
return -3
return 0
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):
class Partition:
def __init__(self, mountpoint, description = "", force_mounted = False):
@@
-242,7
+248,7
@@
class Partition:
class HarddiskManager:
def __init__(self):
self.hdd = [ ]
class HarddiskManager:
def __init__(self):
self.hdd = [ ]
-
+ self.cd = ""
self.partitions = [ ]
self.on_partition_list_change = CList()
self.partitions = [ ]
self.on_partition_list_change = CList()
@@
-295,6
+301,8
@@
class HarddiskManager:
if partition[0:len(blockdev)] != blockdev:
continue
partitions.append(partition)
if partition[0:len(blockdev)] != blockdev:
continue
partitions.append(partition)
+ else:
+ self.cd = blockdev
except IOError:
error = True
return error, blacklisted, removable, is_cdrom, partitions
except IOError:
error = True
return error, blacklisted, removable, is_cdrom, partitions
@@
-357,6
+365,9
@@
class HarddiskManager:
list.append((hdd, hd))
return list
list.append((hdd, hd))
return list
+ def getCD(self):
+ return self.cd
+
def getMountedPartitions(self, onlyhotplug = False):
return [x for x in self.partitions if (x.is_hotplug or not onlyhotplug) and x.mounted()]
def getMountedPartitions(self, onlyhotplug = False):
return [x for x in self.partitions if (x.is_hotplug or not onlyhotplug) and x.mounted()]