mark hotpluggable partitions
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 28 Feb 2008 00:28:04 +0000 (00:28 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 28 Feb 2008 00:28:04 +0000 (00:28 +0000)
lib/python/Components/Harddisk.py

index 8455b865e9145a7ab188627432fba7769625387c..b1016812a449ea54f4bc7a9469277e9f52900c86 100644 (file)
@@ -213,6 +213,7 @@ class Partition:
                self.mountpoint = mountpoint
                self.description = description
                self.force_mounted = force_mounted
+               self.is_hotplug = force_mounted # so far; this might change.
 
        def stat(self):
                return statvfs(self.mountpoint)
@@ -308,7 +309,7 @@ class HarddiskManager:
 
                return list
 
-       def getMountedPartitions(self):
-               return [x for x in self.partitions if x.mounted()]
+       def getMountedPartitions(self, onlyhotplug = False):
+               return [x for x in self.partitions if (x.is_hotplug or not onlyhotplug) and x.mounted()]
 
 harddiskmanager = HarddiskManager()