Inconsistent storage.bus and storage.originating_device info
bazwal at ftml.net
Sun Sep 20 07:51:16 PDT 2009
i'm writing a small application for portable audio players which needs
to get the vendor_id and some properties from the portable_audio_player
namespace. at the moment, i use dbus to search for all devices with
storage.bus == usb, and then use the storage.originating_device to check
unfortunately, sometimes this works and sometimes it doesn't. what i'm
finding is that (apparently ramdomly) the bus will be shown as "pci",
the originating_device as "/org/freedesktop/Hal/devices/computer", and
all the portable_audio_player properties will be missing. other than
showing the wrong information, though, the device works totally
correctly (it's a Samsung YP-P3).
looking in gnome-device-manager i see that the SCSI Host Adapter for the
relevant Mass Storage Drive appears as a child of the USB Device
rather than the USB Mass Storage Interface. The correct UMS interface is
there - it just isn't linked to the correct SCSI Host Adapter.
so is this a problem with hal, or with hal-info?
is there a reliable way to get the relevant UMS Interface that doesn't
depend on querying storage.originating_device?
some info about my setup:
distro: mandriva 2009.1
hal : 0.5.12-0.rc1.20090403.1mdv2009.1
hal-info : 0.0-5.20090414.1mdv2009.1
udev : 140-3.2mnb2
hotplug : 2.4.4-2mdv2009.1
kernel : 220.127.116.11-2mnb2
policykit : 0.9-5mdv2009.1
consolekit : 0.3.0-5mdv2009.1
More information about the hal