Results 1 to 5 of 5
Hi,
I have video capture PCI card and also driver. This driver does ths dynamic allocation of major number to identify the driver module.
Is it possible to change the ...
- 04-19-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 32
Change major number
Hi,
I have video capture PCI card and also driver. This driver does ths dynamic allocation of major number to identify the driver module.
Is it possible to change the dynamically allocated major number. If so , how can it be done.
Your any suggestion will be greatly appreciated.
Thank you
- 04-19-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
You can change this in the function register_chrdev in the source code of your driver.
The function is defined as follow:
If the value of major = 0 the kernel will assign a dynamic major number otherwise the kernel will assign the given number.Code:int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
First look through the used numbers in /usr/src/linux/Documentation/devices.txt.
Regards
- 04-20-2007 #3Just Joined!
- Join Date
- Apr 2007
- Posts
- 32
Change Major number
Hi
Thank you. I know this.
But my driver is developed on the library module saa7146_vv (i.e Video4linux API) Here this library will take care of assigning the standartd major number 81 , whenever I do /sbin/insmod driver_module.ko .
Now can body suggest me How can I change the major number.
Note: I would like to change the major number after inserting the module in the kernel
Any suggestions
Thank you.
- 04-21-2007 #4Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
Well, there's is a way to to do a kernel patch without a LKM; if you have some knowledge of the kernel and LKM's, you may give it a try:
http://doc.bughunter.net/rootkit-bac...-patching.html
Regards
- 04-22-2007 #5Just Joined!
- Join Date
- Apr 2007
- Posts
- 32
re
Hi
Thank you.
It helps me a lot.
Best Regards


Reply With Quote