Minor numbers under 2.6
Hi,
Can somebody clarify a question that i have ?
Say under 2.4 kernel, char device drivers had a minor number of int. In the
2.6 kernels, this number was increased to 20 bits from 8 bits. Under 2.6 i could use "mknod -c major, minor".
How can i achieve something similar with 2.6 taking into consideration that i
have to create more than 255 minors ?
Regards,
Manu
Quoted 9 lines · Manu Abraham
Hi,
Can somebody clarify a question that i have ?Say under 2.4 kernel, char device drivers had a minor number of int. In the
2.6 kernels, this number was increased to 20 bits from 8 bits. Under 2.6 i could use "mknod -c major, minor".How can i achieve something similar with 2.6 taking into consideration that i
have to create more than 255 minors ?
The same way:
# mknod foo c 100 10000 # ls -l foo crw-r--r-- 1 root root 100, 10000 Jun 2 07:48 foo
Just make sure you have a up to date glibc.
Hope this helps,
greg k-h
Quoted 8 lines · Greg KH
The same way:
# mknod foo c 100 10000 # ls -l foo crw-r--r-- 1 root root 100, 10000 Jun 2 07:48 foo
Under 2.6.7-rc2-mm1 :
root@Starbuck:/home/tyler>mknod /dev/test c 100 1000 root@Starbuck:/home/tyler>ll /dev/test crw-r--r-- 1 root root 103, 232 Jun 2 17:07 /dev/test
and under 2.4.26 that's the same.
Quoted 10 lines · Eric BEGOT
Quoted 8 lines · Greg KH
The same way:
# mknod foo c 100 10000 # ls -l foo crw-r--r-- 1 root root 100, 10000 Jun 2 07:48 foo
Quoted 6 lines
Under 2.6.7-rc2-mm1 :
root@Starbuck:/home/tyler>mknod/dev/testc 100 1000 root@Starbuck:/home/tyler>ll/dev/testcrw-r--r-- 1 root root 103, 232 Jun 2 17:07/dev/testand under 2.4.26 that's the same.
Like I stated in my message, which you cut off:
Just make sure you have a up to date glibc.
I'm guessing that you do not have the most recent version of glibc on your machine.
greg k-h
Quoted 16 lines · Greg KH
Quoted 9 lines · Manu Abraham
Hi,
Can somebody clarify a question that i have ?Say under 2.4 kernel, char device drivers had a minor number of int. In
the 2.6 kernels, this number was increased to 20 bits from 8 bits. Under 2.6 i could use "mknod -c major, minor".How can i achieve something similar with 2.6 taking into consideration
that i have to create more than 255 minors ?The same way:
# mknod foo c 100 10000 # ls -l foo crw-r--r-- 1 root root 100, 10000 Jun 2 07:48 foo
Quoted 5 lines
Just make sure you have a up to date glibc.
Hope this helps,
greg k-h
Thanks a lot, I was breaking my head to understand what the hell was going
on.
Thanks again,
Regards,
Manu
Quoted 1 line · Greg KH
Just make sure you have a up to date glibc.
We don't currently require any specific glibc level:
% grep -i glibc /usr/src/linux-2.6.6-mm3/Documentation/Changes %
Hmm... Should we make a note of the glibc level required to make this work? Possibly as a "If you want to use more than 256 minors" optional?