Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 May 2000 20:24:06 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Mark Murray <mark@grondar.za>
Cc:        Peter Wemm <peter@netplex.com.au>, Doug Rabson <dfr@nlsystems.com>, current@FreeBSD.ORG
Subject:   Re: Major device numbers and mem device redesign 
Message-ID:  <13824.958933446@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 21 May 2000 16:41:48 %2B0200." <200005211441.QAA16615@grimreaper.grondar.za> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200005211441.QAA16615@grimreaper.grondar.za>, Mark Murray writes:
>> > > I want to commit a new /dev/random RSN, so I'll be needing a major
>> > > device; what is the procedure for getting one? I know how to steal one,
>> > > but ISTR that this is not how it is done.
>> > 
>> > Just edit sys/conf/majors and claim the next available number.
>> 
>> You don't need one. You can use the same major/minor numbers.  You can
>> register multiple cdevsw's per major number with make_dev();  (do NOT
>> use cdevsw_add() for this).
>
>How does this work for all the routines? When you register the
>"new" minor number, can you be specifying new read/write/poll/ioctl/etc
>routines?
>
>I ask, as my RNG is a kld, and I want it to be as separate as possible
>without getting ridiculous.

make_dev() takes a pointer to your struct cdevsw{} for this particular
minor.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13824.958933446>