On Thu, Mar 01, 2007 at 02:56:15PM -0500, Robert P. J. Day wrote: Simple? Are you crazy? This is one of the most complex, undocumented, mess that we have in the kernel right now. Everytime I dig down into it, I try to get out as soon as possible and I forget what I learned... > i'm trying to clarify the interconnection between all of the sysfs > structures, so a few questions: > > 1) is it true that an entry exists at the top of the sysfs if and only > if it is a subsystem? there's no notion of a lower-level subsystem, > is there? that is, subsystems aren't defined recursively. No, you can create an entry at the top if you use a kobject with no parent. And you can make a subsystem within another subsystem by setting the parent like the pci_hotplug subsystem does it. > 2) as i read it, a subsystem contains only the *default* kset of that > subsystem. so how can one (if it's possible), given a subsystem, > generate a list of *all* of the subsystem's kset children? (i'm > assuming the "list" member structure in a kset is for the list of > kobject children of that kset, right?) Why would you want to do that? But yes, I think you can just walk that list. > 3) as i read it, ksets are also not recursive, so the entire sysfs > structure consists solely of subsystems, which contain ksets, which > contain kobjects, and that's it, right? ksets can't contain other > ksets. I think so. Take a look at the lwn.net articles about this for a bit more description of what is going on. If you want to clean this whole mess up, I'm all for it and I'll buy you a case of your favorite beer. It really needs it as you are finding out. thanks, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ