Where to call my init() from (without LKM)?
George White
georgewhite584 at yahoo.co.uk
Sun Aug 4 05:40:42 EDT 2013
Hi,
For a small side-project I decided to make some changes directly to the kernel code, so that it offers some extra functionality I need.
I have not done this before in such capacity and only put together some modules here and there in the past.
Since now I'm not creating a module, instead I'm hacking the kernel directly, I have some questions:
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?
When developing modules, you have the module_init where you declare a function to run when the module inits and set up everything. In my code, I have a similar init function, that basically sets up some procfs endpoints so that users can configure parts of my system with boolean options (enable/disable functionality).
Question B: Where is the best place to I call this init function from?
Question C: Is using procfs the best option for setting up config options for my system?
Best,
George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130804/975e3e1e/attachment.html
More information about the Kernelnewbies
mailing list