If you argue that they are in fact created by the user because they are a direct result of a user action, then I can apply the same argument to this one example:
...This is precisely what configfs is designed to forbid. The kernelNo. The sub-directory only appears as a direct result of the user writing a value into the 'type' attribute. ;-)
does not, ever, create configfs objects on its own. It does it as a
result of userspace action.
Ok, you're stretching the metaphor. Writing a value to a "type"
attribute is, indeed, a userspace action. However, configfs' contract
is that only mkdir(2) creates objects.
We're not trying to create the do-everything-kitchen-sink system
here. That way lies the problems we're trying to avoid. That's why
configfs has a specific contract it provides to (a) userspace and (b)
client drivers.
you're never going to get it from configfs. You should be usingHardly. sysfs doesn't allow the user creating directories. :>
sysfs.
sysfs certainly supports your "echo b > type" style of object
creation. You're type_file->store() method gets a "b" in the buffer and
then does sysfs_mkdir() of your new object directory. Here, the kernel
is creating the new object (the directory).
Hm, I had envisioned the user to fully configure the module via file system operations only. Now if the user is supposed to use a wrapper program this sheds a different light on all those what's-the-best-solution issues...
Certainly the user can do the configuration by hand. It will
always work. But why make them understand your userspace<->kernel API
when you can just provide a tool? They're all going to script it up
anyway.