diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-01-19 02:16:11 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-01-19 02:16:11 +0100 |
| commit | b37fb8b50e48795882cd933c8ef9fe31b3ef007d (patch) | |
| tree | ec08be74bd904fcd8f3e8e7e46c269176459f14a /lib/python/Plugins/SystemPlugins/Hotplug/plugin.py | |
| parent | 89c625ba57e6b56052c21832722e545197cd9fa8 (diff) | |
| download | enigma2-b37fb8b50e48795882cd933c8ef9fe31b3ef007d.tar.gz enigma2-b37fb8b50e48795882cd933c8ef9fe31b3ef007d.zip | |
rework block device scanning a bit
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/Hotplug/plugin.py')
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/Hotplug/plugin.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py index e593e942..b19007c9 100644 --- a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py @@ -3,17 +3,9 @@ from twisted.internet.protocol import Protocol, Factory from twisted.internet import reactor from Components.Harddisk import harddiskmanager -DEVICEDB = \ - { "/devices/pci0000:00/0000:00:14.2/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0": "CF Slot", - "/devices/pci0000:00/0000:00:14.2/usb1/1-1/1-1:1.0/host0/target1:0:0/0:0:0:0": "SD Slot" - } - hotplugNotifier = [ ] class Hotplug(Protocol): - def getUserfriendlyDeviceName(self, phys): - return DEVICEDB.get(phys, "USB Storage") - def connectionMade(self): self.received = "" @@ -40,14 +32,13 @@ class Hotplug(Protocol): dev = device.split('/')[-1] if action is not None and action == "add": - print "Medium found in", self.getUserfriendlyDeviceName(dev) - harddiskmanager.addHotplugPartition(dev, self.getUserfriendlyDeviceName(physdevpath)) + harddiskmanager.addHotplugPartition(dev, physdevpath) elif action is not None and action == "remove": harddiskmanager.removeHotplugPartition(dev) elif media_state is not None: if media_state == '1': harddiskmanager.removeHotplugPartition(dev) - harddiskmanager.addHotplugPartition(dev, self.getUserfriendlyDeviceName(physdevpath)) + harddiskmanager.addHotplugPartition(dev, physdevpath) elif media_state == '0': harddiskmanager.removeHotplugPartition(dev) |
