On Sun, 04 Aug 2013 10:40:42 +0100, George White said: > Most of my code is implemented in a new file I created under /kernel/ > myfile.c and added in the main Makefile (other parts of the code are spread > around the existing code as edits). > Question A: Is that a good idea? Alternatives? Convince us it should be under kernel/ and not elsewhere in the tree. > Question B: Where is the best place to I call this init function from? There's a nice 'initcall' infrastructure which will get your code called during system boot. You even have some control over *when* it gets called (early, or with other devices, or other kernel code, or late). > Question C: Is using procfs the best option for setting up config options Probably not. sysfs exists for a reason. Also, depending on what the code does and when it needs to initialize, procfs may not be an option (if you have to touch the vallue before userspace gets cranking, it won't work and you need to use a kernel commandline option).
Attachment:
pgpvuQMgkHEzE.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies