[Whee, I didn't see this yesterday.  Stupid mail server.  :-)]

Bruce Dubbs wrote:
> The sysfs filesystem was mentioned briefly above. One may wonder how 
> sysfs knows about the devices present on a system and what device 
> numbers should be used for them. Drivers that have been compiled into
> the kernel directly register their objects with a sysfs (devtmpfs 
> internally)

Well, there's only one sysfs, so "a sysfs" sounds a bit weird.  Just
"register their objects within sysfs" or something perhaps?

Also the "(devtmpfs internally)" is glossing over a bunch of points,
which may or may not actually matter.  It might be more accurate in
terms of kernel internal bits to say something like "register their
objects within sysfs, which automatically causes a default device node
to be created in devtmpfs", or something like that.

> as they are detected by the kernel. For drivers compiled as modules,
> this registration will happen when the module is loaded. Once the
> sysfs filesystem is mounted (on /sys), data which the drivers 
> register with sysfs are available to userspace processes and to udevd
> for processing (including modifications to device nodes).

Not sure if it's worth explicitly mentioning the fact that modifications
to devtmpfs are preserved, even across a umount/mount sequence, since
there's only ever one kernel table holding the FS data, and it exists
whether or not the FS is visible.  Up to you.

> In recent version of udev, udevd no longer creates device files. 
> Instead, this is handled in the kernel by the devtmpfs filesystem.
> Any driver that wishes to register a device node will go through
> devtmpfs (via the driver core) to do it. When a devtmpfs instance is
> mounted on /dev, the device node will initially be created with a
> fixed name, permissions, and owner.

Some of this probably isn't necessary if some of the devtmpfs changes
above are made, but again, up to you.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to