FreeBSD hal requires an extra step to get the correct path to the device to be mounted.

This commit is contained in:
Guido Falsi 2016-03-28 22:33:31 +02:00
parent 9ec9e46197
commit 61bc64adf5

View File

@ -699,7 +699,8 @@ class Device(DeviceConfig, DevicePlugin):
d.manufacturer == objif.GetProperty('usb.vendor') and \
d.product == objif.GetProperty('usb.product') and \
d.serial == objif.GetProperty('usb.serial'):
dpaths = manager.FindDeviceStringMatch('storage.originating_device', path)
midpath = manager.FindDeviceStringMatch('info.parent', path)
dpaths = manager.FindDeviceStringMatch('storage.originating_device', midpath[0])
for dpath in dpaths:
# devif = dbus.Interface(bus.get_object('org.freedesktop.Hal', dpath), 'org.freedesktop.Hal.Device')
try: