All of lore.kernel.org
 help / color / mirror / Atom feed
* Minor numbers under 2.6
@ 2004-06-02 11:19 Manu Abraham
  2004-06-02 14:49 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Manu Abraham @ 2004-06-02 11:19 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minor numbers under 2.6
  2004-06-02 11:19 Minor numbers under 2.6 Manu Abraham
@ 2004-06-02 14:49 ` Greg KH
  2004-06-02 15:10   ` Eric BEGOT
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Greg KH @ 2004-06-02 14:49 UTC (permalink / raw)
  To: Manu Abraham; +Cc: linux-kernel

On Wed, Jun 02, 2004 at 03:19:32PM +0400, Manu Abraham wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minor numbers under 2.6
  2004-06-02 14:49 ` Greg KH
@ 2004-06-02 15:10   ` Eric BEGOT
  2004-06-02 15:16     ` Greg KH
  2004-06-02 17:49   ` Manu Abraham
  2004-06-02 18:44   ` Valdis.Kletnieks
  2 siblings, 1 reply; 6+ messages in thread
From: Eric BEGOT @ 2004-06-02 15:10 UTC (permalink / raw)
  To: Greg KH; +Cc: Manu Abraham, linux-kernel

Greg KH wrote:

>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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minor numbers under 2.6
  2004-06-02 15:10   ` Eric BEGOT
@ 2004-06-02 15:16     ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2004-06-02 15:16 UTC (permalink / raw)
  To: Eric BEGOT; +Cc: Manu Abraham, linux-kernel

On Wed, Jun 02, 2004 at 05:10:46PM +0200, Eric BEGOT wrote:
> Greg KH wrote:
> 
> >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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minor numbers under 2.6
  2004-06-02 14:49 ` Greg KH
  2004-06-02 15:10   ` Eric BEGOT
@ 2004-06-02 17:49   ` Manu Abraham
  2004-06-02 18:44   ` Valdis.Kletnieks
  2 siblings, 0 replies; 6+ messages in thread
From: Manu Abraham @ 2004-06-02 17:49 UTC (permalink / raw)
  To: linux-kernel

On Wednesday 02 Jun 2004 6:49 pm, Greg KH wrote:
> On Wed, Jun 02, 2004 at 03:19:32PM +0400, Manu Abraham wrote:
> > 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


	Thanks a lot, I was breaking my head to understand what the hell was going 
on.

Thanks again,

Regards,
Manu


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minor numbers under 2.6
  2004-06-02 14:49 ` Greg KH
  2004-06-02 15:10   ` Eric BEGOT
  2004-06-02 17:49   ` Manu Abraham
@ 2004-06-02 18:44   ` Valdis.Kletnieks
  2 siblings, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks @ 2004-06-02 18:44 UTC (permalink / raw)
  To: Greg KH; +Cc: Manu Abraham, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

On Wed, 02 Jun 2004 07:49:31 PDT, Greg KH said:

> 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?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-06-02 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-02 11:19 Minor numbers under 2.6 Manu Abraham
2004-06-02 14:49 ` Greg KH
2004-06-02 15:10   ` Eric BEGOT
2004-06-02 15:16     ` Greg KH
2004-06-02 17:49   ` Manu Abraham
2004-06-02 18:44   ` Valdis.Kletnieks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.