Re: Small MAKEDEV bug
On Tue, 09 May 2000 10:26:05 +0200, Sheldon Hearn wrote: I don't agree. I think this is an issue of avoiding changes that unnecessarily astonish existing users. If you can find ways to improve MAKEDEV that don't inconvenience those already familiar with it, great. If your improvements astonish these people, you need to put a bit more thought into what you're actually scoring. I'd like to follow up on myself with a comment that takes a slightly broader view on the problem. As FreeBSD's user base grows, we're going to see two different demands in increasing contention with each other. 1) The demand for an intuitive, consistent interface. 2) The demand for a constant interface. The former represents the need for POLA to be upheld throughout the system at a given moment in time. The latter represents the need for POLA to be upheld from one release to the next, in the arena of "backward compatibility". Both are valid issues that deserve careful thought. In many situations, we can fix inconsistencies "in the moment" without forcing folks to change the way they do things from on release to the next. In those situations where we have to make a decision one way or another, the decision is going to become more and more difficult as the project moves forward. I don't think that the only rule of thumb that can be applied where the two demands are in contention with one another, is that it's worth thinking carefully about what we gain for the change. But we can _certainly_ agree that it's always worth thinking carefully about ways to satisfy _both_ demands wherever possible. Ciao, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
On Mon, 8 May 2000, Tim Vanderhoek wrote: On Mon, May 08, 2000 at 06:56:03PM -0400, Jeroen C. van Gelderen wrote: 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 b$ which jot /usr/bin/jot b$ The jot utility doesn't appear to be in /bin. You can just type all the device names or use a shell loop when /usr/bin is not mounted. b$ echo '$(jot -w da 2 0)' | wc 1 5 17 b$ echo $(jot -w da 2 0) | wc 1 2 8 b$ Heh. Yes, it is much faster to type all the device names than to even type the command to generate them when there are a small number of device names. /me mumbles something about the prototypical UNIX hacker... :-) I wouldn't use jot for MAKEDEV'ing disks in practice :-). Part of my point is the new syntax for MAKEDEV is just as hard to remember as the syntax for jot. You would use it once or twice per millenium after install more than about 8 drives at once. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
In message [EMAIL PROTECTED], "David O'Brien" writes: 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. Make it MAKEDEV -num_of_devs dev_name and there will be no ambiguity. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | 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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
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. The good part of this solution is that it's backwards compatible. If the first argument is an integer and the second a device name without a suffix we do the new thing, if not we revert to the traditional behaviour. bde: what do you think? Cheers, Jeroen To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
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 Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
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 dev8 creates just dev8, not dev0-dev7. 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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
On Mon, May 08, 2000 at 06:56:03PM -0400, Jeroen C. van Gelderen wrote: 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 b$ which jot /usr/bin/jot b$ The jot utility doesn't appear to be in /bin. b$ echo '$(jot -w da 2 0)' | wc 1 5 17 b$ echo $(jot -w da 2 0) | wc 1 2 8 b$ Heh. /me mumbles something about the prototypical UNIX hacker... :-) -- Signature withheld by request of author. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
-On [2506 21:55], Bruce Evans ([EMAIL PROTECTED]) wrote: On Sat, 6 May 2000, Maxim Sobolev wrote: I've just noticed that "sh MAKEDEV acd1" doesn't produce node for acd1 due to incorrect comparasion in the "while" loop. This affecting both 4.0-STABLE and 5.0-CURRENT. With this message I'm attaching short patch which should solve this little problem. This is the intended behaviour. "sh MAKEDEV acdN" is supposed to create N acd devices, numbered from 0 to N-1. This broken behaviour was introduced for cd*, mcd* and scd* in rev.1.171. It has since spread to acd*. Other types of disks are handled correctly. Bah, bah, bah. I am really starting to wonder about this sunburn thing. Can we settle this once and for all in a slightly sane manner? I committed the change so that MAKEDEV acd1 creates acd1 and not just acd0. I personally think this is more consistent with the wd/sa/da/ad numbering scheme and would propose to fix the other cd* entries likewise. Because otherwise somebody other than me will make the same (commit) mistake x days/weeks/months/years into the future. Opinions? -- Jeroen Ruigrok van der Werven Network- and systemadministrator [EMAIL PROTECTED]VIA Net.Works The Netherlands BSD: Technical excellence at its best http://www.via-net-works.nl In this short time of promise, you're a memory... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
On Sun, May 07, 2000 at 04:59:46PM +0200, Jeroen Ruigrok van der Werven wrote: Can we settle this once and for all in a slightly sane manner? I committed the change so that MAKEDEV acd1 creates acd1 and not just acd0. This is wrong. ``MAKEDEV acd2'' should either create only /dev/acd2*, or /dev/acd[01]*. It would be nice to fix our inconsistency problem. Looking at the 4.4Lite vendor import to find the BSD way would be a good start. -- -- David([EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
[CC culled, -stable removed] David O'Brien wrote: On Sun, May 07, 2000 at 04:59:46PM +0200, Jeroen Ruigrok van der Werven wrote: Can we settle this once and for all in a slightly sane manner? I committed the change so that MAKEDEV acd1 creates acd1 and not just acd0. This is wrong. ``MAKEDEV acd2'' should either create only /dev/acd2*, or /dev/acd[01]*. It would be nice to fix our inconsistency problem. Looking at the 4.4Lite vendor import to find the BSD way would be a good start. 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" -- David([EMAIL PROTECTED]) Jeroen To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Small MAKEDEV bug
Hi, I've just noticed that "sh MAKEDEV acd1" doesn't produce node for acd1 due to incorrect comparasion in the "while" loop. This affecting both 4.0-STABLE and 5.0-CURRENT. With this message I'm attaching short patch which should solve this little problem. -Maxim --- MAKEDEV 2000/05/06 08:25:52 1.1 +++ MAKEDEV 2000/05/06 08:26:14 @@ -795,7 +795,7 @@ fi if [ "${units}" -le 31 ]; then i=0 - while [ $i -lt $units ]; do + while [ $i -le $units ]; do dname=$name$i rm -rf ${dname}* r${dname}* mknod ${dname}a c $chr $(($i * 8)) root:operator
Re: Small MAKEDEV bug
On Sat, 6 May 2000, Maxim Sobolev wrote: I've just noticed that "sh MAKEDEV acd1" doesn't produce node for acd1 due to incorrect comparasion in the "while" loop. This affecting both 4.0-STABLE and 5.0-CURRENT. With this message I'm attaching short patch which should solve this little problem. This is the intended behaviour. "sh MAKEDEV acdN" is supposed to create N acd devices, numbered from 0 to N-1. This broken behaviour was introduced for cd*, mcd* and scd* in rev.1.171. It has since spread to acd*. Other types of disks are handled correctly. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Small MAKEDEV bug
Bruce Evans wrote: On Sat, 6 May 2000, Maxim Sobolev wrote: I've just noticed that "sh MAKEDEV acd1" doesn't produce node for acd1 due to incorrect comparasion in the "while" loop. This affecting both 4.0-STABLE and 5.0-CURRENT. With this message I'm attaching short patch which should solve this little problem. This is the intended behaviour. "sh MAKEDEV acdN" is supposed to create N acd devices, numbered from 0 to N-1. This broken behaviour was introduced for cd*, mcd* and scd* in rev.1.171. It has since spread to acd*. Other types of disks are handled correctly. How broken behaviour could be "intended"? It is unclear why *cd* devices should be different from all others types of disk devices. Users usually being confused when dealing with special cases like that. I think that there will be no problem if it would create N+1 devices at least until someone will reimplement it correctly. -Maxim To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message