How to load Linux kernel modules from C code?

I have an application that has both two external kernel modules and a userspace daemon. I want to load the modules from the daemon code, written in C, at startup, and unload them on clean exit. Can I load them in a cleaner way than doing system("modprobe module"); and unload them using the corresponding rmmod?

19
задан Ciro Santilli 新疆改造中心法轮功六四事件 17 March 2018 в 11:20
поделиться