Re: [RFC] User Guide for Sysfs and libudev

From: Kay Sievers
Date: Tue May 25 2010 - 00:44:00 EST


On Mon, May 24, 2010 at 20:08, Alan Ott <alan@xxxxxxxxxxx> wrote:
> Several weeks ago I had need of libudev, and was unable to find very
> much documentation for it on the web.
>
> I have created a guide on how to use libudev, which also provides some
> background information on /dev, Sysfs, and why this kind of thing is needed.
>
> Please check it out and provide comments, as I'm sure there are things
> which I have gotten wrong or omitted.
>
> The guide can be found here:
> Â Âhttp://www.signal11.us/oss/udev/

Enumeration and monitoring should be in one example, I guess -- that's
what people are supposed to do today. Before starting to enumerate,
software should subscribe to events. This makes the handle
coldplug/hotplug properly, makes it handle duplicate events properly,
and all other sorts of cases, which software should handle today.

Also "change" is not necessarily a "property" change, it can be any
event, that a device has changed its state, it will only in a few
cases be visible in /sys. The most prominent example is "media
changed" event for SCSI devices, and we forward them to the block
device. There will never change anything in /sys before or after the
event.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/