On Fri, 31 Jul 2015 16:16:14 -0700, Nicholas Murphy said:
> Hmm…I suppose not.  I’d would still be curious what the right way to do 
> this
> is, though?  I think I can get away with that trick, but I can also imagine
> scenarios where I’d want the kernel module itself to create the file.

In general, the right answer is to do the file handling in userspace. Among
other things, that makes it possible to avoid hard-coding a filename in
kernel code (remember - we try to make the kernel be about mechanism, not
policy).

Among other things, it avoids the effort of opening a file that userspace
never actually does anything with - if you wait for userspace to open it
and notify the kernel, you can be pretty sure that it's about to be used.

Attachment: pgpd9CbqoFzzE.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to