Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-09-2006, 10:59 PM   #1
LQ Newbie
Registered: Dec 2005
Posts: 11

Rep: Reputation: 0
Question Character Device driver: How to load it automatically ?

Hi friends,
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().
Thank you.
Warmth and regards,
Swanand Shende.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Character device driver calsoft_pg Linux - Software 0 01-03-2006 01:17 PM
how to load modules automatically kulmis Linux - Newbie 4 08-08-2005 10:59 AM
automatic driver load & device permissions xtravar Linux - Hardware 0 06-17-2005 01:30 PM
Character Device kernel(2.4.18) - module problem shibdas Programming 2 11-11-2004 04:52 AM
How to change character device file name? taphos Linux - General 2 03-28-2004 09:12 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration