Re: Major device numbers and mem device redesign

2000-05-21 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, Mark Murray writes: >> > I ask, as my RNG is a kld, and I want it to be as separate as possible >> > without getting ridiculous. >> >> Yes. You could just cut/paste the existing mem.c driver, and remove >> everything but the random hooks. In your init code regist

Re: Major device numbers and mem device redesign

2000-05-21 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, 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 cla

Re: Major device numbers and mem device redesign

2000-05-21 Thread Mark Murray
> Yes. Each instance of make_dev() takes a cdevsw argument for the minor numbe r > in question. So, you could have /dev/mem read/write/ioctl etc routines > for major 2, minor 0 and 1, while have minors 3 and 4 being installed with > their own open/close/read/write/etc routines. > > Devices are

Re: Major device numbers and mem device redesign

2000-05-21 Thread Mark Murray
> > I ask, as my RNG is a kld, and I want it to be as separate as possible > > without getting ridiculous. > > Have a look at http://jeroen.vangelderen.org/FreeBSD/misc_device . Thanks! You have some good ideas in there; I may just borg some of them. :-) M -- Mark Murray Join the anti-SPAM mov

Re: Major device numbers and mem device redesign

2000-05-21 Thread Jeroen C. van Gelderen
Mark Murray wrote: > > > > > 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 numb

Re: Major device numbers and mem device redesign

2000-05-21 Thread Mark Murray
> On Sun, May 21, 2000 at 09:53:18AM +0200, Mark Murray wrote: > > I want to commit a new /dev/random RSN, > > Forgot to mention, please keep in mind this needs to be MI. > sys/kern_random.c (which was sys/i386/isa/random_machdep.c) still is > *very* ugly from a MI point of view. Any changes to

Re: Major device numbers and mem device redesign

2000-05-21 Thread David O'Brien
On Sun, May 21, 2000 at 09:53:18AM +0200, Mark Murray wrote: > I want to commit a new /dev/random RSN, Forgot to mention, please keep in mind this needs to be MI. sys/kern_random.c (which was sys/i386/isa/random_machdep.c) still is *very* ugly from a MI point of view. Any changes to kern_random.

Re: Major device numbers and mem device redesign

2000-05-21 Thread David O'Brien
On Sun, May 21, 2000 at 09:53:18AM +0200, Mark Murray wrote: > I want to commit a new /dev/random RSN, so I'll be needing a major > device; Why can't you just rip out the existing random stuff and put in your new stuff -- keeping the major and minor numbers the same? -- -- David ([EMAIL PROTEC

Re: Major device numbers and mem device redesign

2000-05-21 Thread Mark Murray
> > I ask, as my RNG is a kld, and I want it to be as separate as possible > > without getting ridiculous. > > Yes. You could just cut/paste the existing mem.c driver, and remove > everything but the random hooks. In your init code register minors 3 and > 4, and that's all you have to worry abo

Re: Major device numbers and mem device redesign

2000-05-21 Thread Peter Wemm
Mark Murray wrote: > > > > 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

Re: Major device numbers and mem device redesign

2000-05-21 Thread Mark Murray
> > > 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. Yo

Re: Major device numbers and mem device redesign

2000-05-21 Thread Peter Wemm
Doug Rabson wrote: > On Sun, 21 May 2000, Mark Murray wrote: > > > Hi > > > > 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/major

Re: Major device numbers and mem device redesign

2000-05-21 Thread Doug Rabson
On Sun, 21 May 2000, Mark Murray wrote: > Hi > > 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

Major device numbers and mem device redesign

2000-05-21 Thread Mark Murray
Hi 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. Also - Peter said something about the "mem" device needing to only contain the /dev/mem and /mem/kmem devices, a