LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2006, 12:28 PM   #1
shendeswanand
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Rep: Reputation: 0
Question Device drivers : How to insmod and mknod through an application program?


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.

Last edited by shendeswanand; 02-08-2006 at 12:29 PM.
 
  


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
ATI drivers not loaded at boot, and cannot insmod. Suggestions? Kramer Linux - Software 2 11-02-2005 07:06 AM
more application to use same device? flying_pig Linux - Newbie 5 05-17-2004 07:25 AM
Finding which application is using a device The Last Grok Linux - Hardware 2 05-01-2004 06:42 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 01:21 PM
Access linux device driver from a java application bnujos Programming 3 07-02-2003 05:55 AM


All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration