Date: Mon, 08 May 2000 18:56:03 -0400 From: "Jeroen C. van Gelderen" <jeroen@vangelderen.org> To: Bruce Evans <bde@zeta.org.au> Cc: David O'Brien <obrien@FreeBSD.ORG>, Jeroen Ruigrok van der Werven <asmodai@FreeBSD.ORG>, current@FreeBSD.ORG Subject: Re: Small MAKEDEV bug Message-ID: <39174603.3BBBD536@vangelderen.org> References: <Pine.BSF.4.21.0005090546310.6783-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: > > On Mon, 8 May 2000, David O'Brien wrote: > > > On Sun, May 07, 2000 at 03:27:07PM -0400, Jeroen C. van Gelderen wrote: > > > Or just settle for a more intuitive solution: > > > MAKEDEV acd2 creates /dev/acd2 > > > MAKEDEV 2 acd creates /dev/acd[01] > > > which would allow for "MAKEDEV 64 da" and "MAKEDEV 256 pty" > > > > I agree with this syntax and after sending my message to you, was sitting > > there thinking "MAKEDEV <num_of_devs> <dev_name>" would make a really > > nice clear syntax. If you can get BDE's buy-in and other BSD > > traditionalists I think this would be great. > > I don't buy it :-). This syntax is similar to a special case of the syntax > of jot(1). It's better to use jot(1) directly, e.g.: > > MAKEDEV $(jot -w da 2 0) # make 2 acd devices beginning at acd0 From this it follows that MAKEDEV should be modified to create just it's argument: MAKEDEV <dev>8 creates just <dev>8, not <dev>0-<dev>7. Otherwise MAKEDEV $(jot -w da 6 4) wouldn't work or violate POLA. Agreed? Now it's a question of "the UNIX way" vs. convenience/userfriendlyness :-) Is it acceptable to have all users juggle with jot(1) or can we build in a convenience syntax that covers 95% of all uses? I'd think the latter, otherwise we might as well force our users to use mknod(8) and chmod(1) directly instead of MAKEDEV; After all, MAKEDEV is just a convenient wrapper around those commands. So I'd still propose: MAKEDEV <count> <device_name_without_suffix> MAKEDEV <device_name_with_suffix> ... As a consolation, added such a special syntax can be added in a few lines at the top of MAKEDEV, after which it recursively calls MAKEDEV with the appropriate jot(1)-expanded device list. So it doesn't clobber the code. Thoughts? Cheers, Jeroen 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?39174603.3BBBD536>