Date: Fri, 11 Jan 2002 18:48:22 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: <cjclark@alum.mit.edu> Cc: <freebsd-bugs@FreeBSD.ORG> Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE Message-ID: <20020111181807.C625-100000@gamplex.bde.org> In-Reply-To: <20020110130543.A11553@blossom.cjclark.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Jan 2002, Crist J . Clark wrote: > On Fri, Jan 11, 2002 at 12:07:56AM +1100, Bruce Evans wrote: > > On Thu, 10 Jan 2002, Crist J . Clark wrote: > > (1) "sh MAKEDEV cdN" still makes N units numbered 0 to N-1 instead of unit > > N like one would expect. > > Actually, it makes devices 0 to N. Ugh. I forgot that this regressed in a previous wrong fix for this bug suite (rev.1.249). This bug has apparently been copied to give an off by one error in the number of units for bpf, tap and tun as well as acd*t. It is missing for older synthetic devices like vty and pty (bpf is old but was originally handled better by making only one unit). > > (2) The bug is also in acd*t*. > > Several other devices are made this way like the vty's. Then there are > some really weird unit numbers, like the pty's. Synthetic devices are free and the maxiumum number that you can use (but not want :-) changes often, so it is reasonable to have a very easy way (easier than iterating MAKEDEV using jot -mumble) to create lots of them. However, I think the implementation is bad. There should be a case statement to make only the Nth device. General code could then handle the iteration. > However, I could see going to only creating node 'N' since this is > what the HDD devices (da, ad) and even wcd and matcd do. This would be going back to the old behaviour for cd. cd used to be handled like da, but was broken without discussion or logging in rev.1.171 (part of the big first CAM commit). It's silly for cdrom devices to be easier to create than hard disk devices. We support up to 512 hard disk devices per driver type but only 32 cdrom devices per driver type. I guess systems with multiple hard disks are much more common than multiple cdroms. > So if we are actually going to go an change this behavior, > [code deleted] OK with me, but this is moot in -current since devfs is standard in -current. It's too late to fix it properly in RELENG_4. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020111181807.C625-100000>