LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-09-2006, 09:59 PM   #1
shendeswanand
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.
 
  


Reply


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 12:17 PM
how to load modules automatically kulmis Linux - Newbie 4 08-08-2005 09:59 AM
automatic driver load & device permissions xtravar Linux - Hardware 0 06-17-2005 12:30 PM
Character Device kernel(2.4.18) - module problem shibdas Programming 2 11-11-2004 03:52 AM
How to change character device file name? taphos Linux - General 2 03-28-2004 08:12 AM


All times are GMT -5. The time now is 04:46 AM.

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