Date: Thu, 28 Aug 2003 16:04:56 +0000 From: Marcel Moolenaar <marcel@xcllnt.net> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf majors Message-ID: <20030828160456.GA497@dhcp01.pn.xcllnt.net> In-Reply-To: <5535.1062077047@critter.freebsd.dk> References: <ybsisohhqay.wl@ett.sat.t.u-tokyo.ac.jp> <5535.1062077047@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 28, 2003 at 03:24:07PM +0200, Poul-Henning Kamp wrote: > >> > > >> >Do you have any sample of console drivers converted to use MAJOR_AUTO? > >> > >> I don't really think that it matters that it is a console driver, > >> why should it ? > > > >We call makedev() in cnprobe and we cannot call make_dev() before > >SI_SUB_DRIVERS. This is my understanding why we have not converted > >any console driver to use MAJOR_AUTO. > > Ohh, right, _that_ hack. > > Yes, in that case you need a static Major. uart(4) in Perforce uses auto-assigned major numbers and is a console device. The trick is to not call makedev() in cnprobe(), but after make_dev() has been called. We don't actually use the device number until we start init(8). -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030828160456.GA497>