Device drivers : How to insmod and mknod through an application program?
this is swanand. I have written a character device driver. I use this the functionalities of this driver only sometimes acording to the schedule.
So i wanted to install the modules inside the kernel from my application program. In the init_module, i register the device and print its major number using printk statement. Then i use mknod to create a device file.
I also tried to use system("insmod ./char.ko > fp"); to redirect the major number to a file through which i will read later, but didn't work.
Can anyone please tell me how do i install my character device driver with the system through my program ?
My problem is that how do come to know the major number which gets dynamically allocated during my init_module().
Warmth and regards,
Last edited by shendeswanand; 02-08-2006 at 12:29 PM.