Re: can i see a driver's registered *minor* number(s)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert P. J. Day wrote:
On Fri, 11 Apr 2008, Rene Herman wrote:

  
On 11-04-08 11:56, Robert P. J. Day wrote:

    
  i know well enough that, if i write and load a driver that allocates
a device major number and one or more minor numbers, i can see the
allocated major number via /proc/devices.  but is there a userspace
way to see the minor number(s)?  or, as LDD3 implies, it's my job to
just *know* what those would have been?  thanks.
      

  
Historically, no way. The driver just gets everything for its
registered major and has to switch on minor itself. That is, no such
thing as "allocated" minors as far as the system is concerned.
    

just to be pedantic here, when you say there are no such things as
"allocated" minors, i'm assuming that what you mean is that it's
always up to a loaded module to choose what minors it wants to try to
allocate and register, right?  or, put another way, there are no such
things as *pre*-allocated minors.  am i parsing that the right way?

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ

  

Hrm... that could be an insmod parameter, perhaps?  Have you tried modinfo on the usb driver?  It always seems fairly random to me, but then again, I've never paid attention to it.  Also, there's 'mknod' and 'mknodat' in man 2, user side.  I don't know if that helps at all.
begin:vcard
fn:Scott Lovenberg
n:Lovenberg;Scott
org:The CleftStone Works
adr:;;;Kutztown;PA;19530;USA
email;internet:scott.lovenberg@xxxxxxxxx
tel;cell:570-856-2999
note;quoted-printable:Interests:=0D=0A=
	Programming, *NIX, Slackware, Samba, C/C++, Perl, Java, .NET, Kernel Hack=
	ing, Virtual Machines, FOSS, Security, Operating Systems, Various Softwar=
	e Stacks.  =
	=0D=0A=
	=0D=0A=
	Always have time for "shop talk"; feel free to drop me a line.
x-mozilla-html:TRUE
url:www.cleftstoneworks.com
version:2.1
end:vcard


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux