Getting UDI information after a device has been removed

Rohan McGovern at
Wed Mar 1 17:33:10 PST 2006

On Thu, 2 Mar 2006 10:53, Danny Budik wrote:
> Hi all again,
> I am wondering if it's possible to obtain UDI information about a 
> that I just removed. For example, I have an Ipod plugged in. When I 
> remove it, I want to verify that it's an Ipod by reading the 
> vendor/product IDs.
> I can get this information when I plug in a device, using 
> libhal_device_get_property_xxx(). When I tried to use that function 
> inside the hal_device_removed callback the error is:
> No device with id 
> /org/freedesktop/Hal/devices/usb_device_547_1002_noserial_if0: 
> temporarily unavailable
> which makes sense. I removed the device, so why should it have a UDI 
> entry. But I still want to figure out that info.

You can store all properties of a device with a LibHalPropertySet.  See 
function libhal_device_get_all_properties.  Then you can keep that 
property set around for as long as you like, regardless of whether the 
device is still attached.  Someone else might know a better way 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url :

More information about the hal mailing list