All of lore.kernel.org
 help / color / mirror / Atom feed
* udev_device_get_sysattr_value upon device remove
@ 2010-12-03 19:19 Stefan Harjes
  2010-12-03 23:12 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Harjes @ 2010-12-03 19:19 UTC (permalink / raw)
  To: linux-hotplug

Hi folks,

when I get an udev_device from the udev_monitor, because the device has been 
unplugged, the 'udev_device_get_sysattr_value()' call returns 'null' (in my 
case I was looking for the "serial" of an usb_device). From my understanding 
this value should still be cached, even if the device is already removed?

Is there any other way to get this value?

Best

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: udev_device_get_sysattr_value upon device remove
  2010-12-03 19:19 udev_device_get_sysattr_value upon device remove Stefan Harjes
@ 2010-12-03 23:12 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2010-12-03 23:12 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Dec 3, 2010 at 20:19, Stefan Harjes <stefan.harjes@gmx.net> wrote:
> when I get an udev_device from the udev_monitor, because the device has been
> unplugged, the 'udev_device_get_sysattr_value()' call returns 'null' (in my
> case I was looking for the "serial" of an usb_device). From my understanding
> this value should still be cached, even if the device is already removed?

Devices which are removed have no attributes, not in sysfs, not
anywhere else. They are just gone.

> Is there any other way to get this value?

You have to store stuff you want to remember in the udev database,
which is available during remove, everything else is not.

Kay

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-03 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03 19:19 udev_device_get_sysattr_value upon device remove Stefan Harjes
2010-12-03 23:12 ` Kay Sievers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.