From andre.albsmeier@mchp.siemens.de  Sat Aug  5 13:21:46 2000
Return-Path: <andre.albsmeier@mchp.siemens.de>
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
	by hub.freebsd.org (Postfix) with ESMTP id 138CF37B9CA
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Aug 2000 13:21:45 -0700 (PDT)
	(envelope-from andre.albsmeier@mchp.siemens.de)
Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14])
	by david.siemens.de (8.10.1/8.10.1) with ESMTP id e75KLh600966
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 5 Aug 2000 22:21:43 +0200 (MET DST)
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7])
	by mail1.siemens.de (8.10.1/8.10.1) with ESMTP id e75KLhT22531
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 5 Aug 2000 22:21:43 +0200 (MET DST)
Received: (from localhost)
	by curry.mchp.siemens.de (8.10.2/8.10.2) id e75KLgT64583
	for FreeBSD-gnats-submit@freebsd.org; Sat, 5 Aug 2000 22:21:42 +0200 (CEST)
Message-Id: <200008052021.e75KLgk18978@curry.mchp.siemens.de>
Date: Sat, 5 Aug 2000 22:21:42 +0200 (CEST)
From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Can't make only cd0 under 4.1-STABLE
X-Send-Pr-Version: 3.2

>Number:         20436
>Category:       conf
>Synopsis:       Can't make only cd0 under 4.1-STABLE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    iedowse
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 05 13:30:00 PDT 2000
>Closed-Date:    Mon Sep 16 16:24:39 PDT 2002
>Last-Modified:  Mon Sep 16 16:24:39 PDT 2002
>Originator:     Andre Albsmeier
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
>Environment:

FreeBSD 4.1-STABLE

>Description:

It is not possible to make only cd0.

>How-To-Repeat:

as root:

mkdir /tmp/x
cd /tmp/x
cp /dev/MAKEDEV .
./MAKEDEV cd
ls -l

./MAKEDEV cd0 produces the same result


>Fix:

--- /dev/MAKEDEV	Tue Aug  1 10:51:44 2000
+++ MAKEDEV	Sat Aug  5 22:17:41 2000
@@ -794,8 +794,8 @@
 	mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; chr=29;;
 	scd*) units=`expr $i : '...\(.*\)'`; name=scd; chr=45;;
 	esac
-	if [ -z "${units}" -o "${units}" -le 0 ]; then
-		units=1
+	if [ -z "${units}" ]; then
+		units=0
 	fi
 	if [ "${units}" -le 31 ]; then
 		i=0

>Release-Note:
>Audit-Trail:

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE 
Date: Mon, 07 Aug 2000 13:37:47 +0200

 On Sat, 05 Aug 2000 22:21:42 +0200, Andre Albsmeier wrote:
 
 > It is not possible to make only cd0.
 
 Actually, I think that the correct fix is probably something more like
 this.  However, I wouldn't want to commit this without seeing what
 impact it has on a release.
 
 Ciao,
 Sheldon.
 
 Index: MAKEDEV
 ===================================================================
 RCS file: /home/ncvs/src/etc/MAKEDEV,v
 retrieving revision 1.266
 diff -u -d -r1.266 MAKEDEV
 --- MAKEDEV	2000/07/30 16:18:48	1.266
 +++ MAKEDEV	2000/08/07 11:37:09
 @@ -803,7 +803,7 @@
  	fi
  	if [ "${units}" -le 31 ]; then
  		i=0
 -		while [ $i -le $units ]; do
 +		while [ $i -lt $units ]; do
  			dname=$name$i
  			rm -rf ${dname}* r${dname}*
  			mknod ${dname}a c $chr $(($i * 8)) root:operator
 
Responsible-Changed-From-To: freebsd-bugs->asmodai 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Aug 7 04:46:23 PDT 2000 
Responsible-Changed-Why:  
Jeroen, could you look at this PR?  It seems odd that the 
comparison for CDROMs is different from the comparisons 
made for other device nodes. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20436 

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE
Date: Mon, 7 Aug 2000 13:41:40 +0200

 On Mon, 07-Aug-2000 at 13:37:47 +0200, Sheldon Hearn wrote:
 > 
 > 
 > On Sat, 05 Aug 2000 22:21:42 +0200, Andre Albsmeier wrote:
 > 
 > > It is not possible to make only cd0.
 > 
 > Actually, I think that the correct fix is probably something more like
 > this.  However, I wouldn't want to commit this without seeing what
 > impact it has on a release.
 
 Should we bother Jordan with this?
 
 
 > Ciao,
 > Sheldon.
 > 
 > Index: MAKEDEV
 > ===================================================================
 > RCS file: /home/ncvs/src/etc/MAKEDEV,v
 > retrieving revision 1.266
 > diff -u -d -r1.266 MAKEDEV
 > --- MAKEDEV	2000/07/30 16:18:48	1.266
 > +++ MAKEDEV	2000/08/07 11:37:09
 > @@ -803,7 +803,7 @@
 >  	fi
 >  	if [ "${units}" -le 31 ]; then
 >  		i=0
 > -		while [ $i -le $units ]; do
 > +		while [ $i -lt $units ]; do
 >  			dname=$name$i
 >  			rm -rf ${dname}* r${dname}*
 >  			mknod ${dname}a c $chr $(($i * 8)) root:operator
 
 
 You are right. units are probably the number of cd devices wanted.
 So if units=1 it should create one cd (cd0).
 
 	-Andre
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE 
Date: Mon, 07 Aug 2000 13:47:45 +0200

 On Mon, 07 Aug 2000 13:41:40 +0200, Andre Albsmeier wrote:
 
 > Should we bother Jordan with this?
 
 Let's see what asmodai says -- we'd be reverting a change he made in
 rev 1.249.
 
 Ciao,
 Sheldon.
 

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE
Date: Mon, 7 Aug 2000 13:58:24 +0200

 On Mon, 07-Aug-2000 at 13:47:45 +0200, Sheldon Hearn wrote:
 > 
 > 
 > On Mon, 07 Aug 2000 13:41:40 +0200, Andre Albsmeier wrote:
 > 
 > > Should we bother Jordan with this?
 > 
 > Let's see what asmodai says -- we'd be reverting a change he made in
 > rev 1.249.
 
 Oops, I see. But the current behaviour can be considered wrong.
 
 The whole thing was probably already discussed to death but I still don't
 get it why "MAKEDEV cd3" should build cd0-cd2... What is so difficult to
 type "MAKEDEV cd0 cd1 cd2" ? At least this would be the same behaviour
 as we got with "MAKEDEV da...".
 
 I think it should be possible to create individual devices. If there
 is some extension, maybe in the form of "MAKEDEV cd0-4" or similar,
 thats OK.
 
 	-Andre
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE 
Date: Mon, 07 Aug 2000 14:00:42 +0200

 On Mon, 07 Aug 2000 13:58:24 +0200, Andre Albsmeier wrote:
 
 > The whole thing was probably already discussed to death but I still don't
 > get it why "MAKEDEV cd3" should build cd0-cd2... What is so difficult to
 > type "MAKEDEV cd0 cd1 cd2" ? At least this would be the same behaviour
 > as we got with "MAKEDEV da...".
 
 Don't lose your original issue in the face of religious war.  The point
 folks are likely to agree on is that ``MAKEDEV cd0'' should create a
 single device and that ``MAKEDEV cd1'' should create two devices.
 
 This is pretty standard and well-accepted behaviour, and you're likely
 to win that one.
 
 Going further than that right now is just going to get your original
 issue lost in the noise.
 
 Ciao,
 Sheldon.
 

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE
Date: Mon, 7 Aug 2000 14:02:53 +0200

 On Mon, 07-Aug-2000 at 14:00:42 +0200, Sheldon Hearn wrote:
 > 
 > 
 > On Mon, 07 Aug 2000 13:58:24 +0200, Andre Albsmeier wrote:
 > 
 > > The whole thing was probably already discussed to death but I still don't
 > > get it why "MAKEDEV cd3" should build cd0-cd2... What is so difficult to
 > > type "MAKEDEV cd0 cd1 cd2" ? At least this would be the same behaviour
 > > as we got with "MAKEDEV da...".
 > 
 > Don't lose your original issue in the face of religious war.  The point
 > folks are likely to agree on is that ``MAKEDEV cd0'' should create a
 > single device and that ``MAKEDEV cd1'' should create two devices.
 > 
 > This is pretty standard and well-accepted behaviour, and you're likely
 > to win that one.
 > 
 > Going further than that right now is just going to get your original
 > issue lost in the noise.
 
 Agreed. Let's face on the "MAKEDEV cd0" thing :-)
 
 	-Andre
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-gnats-submit@FreeBSD.org, asmodai@FreeBSD.ORG
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE 
Date: Tue, 08 Aug 2000 12:23:28 +0200

 On Tue, 08 Aug 2000 03:25:33 +1000, Bruce Evans wrote:
 
 > The bug in the PR is caused by a wrong fix for this in rev.1.249.
 
 This was my impression too.  However, it seems to me that it's very
 common (almost standard) for targets in MAKEDEV to take the unit number
 supplied as a unit count, rather than a specific node name.
 
 Therefore, I think that it's enough to revert rev 1.249.  However, I
 also think that the MAKEDEV manual page could do with some serious
 work.  I think thta the manual page should clearly describe that the
 unit number argument can mean two different things.
 
 Most of the reason I want to do this is because I don't think that I can
 win the holy war issue that the unit number should mean only one thing
 to all targets.
 
 If you think I can win that war, perhaps I'll take a stab at converting
 every MAKEDEV target to read the passed unit number target as a specific
 device node name and update the manual page with an EXAMPLES section
 that provides shell magic to produce a range of device node names.
 
 What say you? :-)
 
 Ciao,
 Sheldon.
 
Responsible-Changed-From-To: asmodai->freebsd-doc 
Responsible-Changed-By: asmodai 
Responsible-Changed-When: Fri Nov 16 02:27:31 PST 2001 
Responsible-Changed-Why:  
Move back to the doc pool. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=20436 
Responsible-Changed-From-To: freebsd-doc->freebsd-bugs 
Responsible-Changed-By: dd 
Responsible-Changed-When: Sun Jan 6 23:04:34 PST 2002 
Responsible-Changed-Why:  
This is not a doc PR. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=20436 

From: "Crist J . Clark" <cjc@freebsd.org>
To: bug-followup@freebsd.org
Cc: Sheldon Hearn <sheldonh@uunet.co.za>,
	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE
Date: Thu, 10 Jan 2002 00:48:28 -0800

 So... This make everyone happy?
 
 Index: src/etc/MAKEDEV
 ===================================================================
 RCS file: /export/ncvs/src/etc/MAKEDEV,v
 retrieving revision 1.320
 diff -u -r1.320 MAKEDEV
 --- src/etc/MAKEDEV	27 Dec 2001 22:41:35 -0000	1.320
 +++ src/etc/MAKEDEV	10 Jan 2002 08:42:46 -0000
 @@ -831,7 +831,7 @@
  	scd*) units=`expr $i : '...\(.*\)'`; name=scd; chr=45;;
  	esac
  	if [ -z "${units}" -o "${units}" -le 0 ]; then
 -		units=1
 +		units=0
  	fi
  	if [ "${units}" -le 31 ]; then
  		i=0
 
 -- 
 "It's always funny until someone gets hurt. Then it's hilarious."
 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: Sheldon Hearn <sheldonh@starjuice.net>
To: "Crist J . Clark" <cjc@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: conf/20436: Can't make only cd0 under 4.1-STABLE 
Date: Thu, 10 Jan 2002 14:55:37 +0200

 On Thu, 10 Jan 2002 01:00:03 PST, "Crist J . Clark" wrote:
 
 >  So... This make everyone happy?
 
 Makes me happy.  Can't speak for everyone else.
 
 Ciao,
 Sheldon.
State-Changed-From-To: open->patched 
State-Changed-By: iedowse 
State-Changed-When: Fri Aug 9 17:20:48 PDT 2002 
State-Changed-Why:  

Fixed in -current, awaiting MFC. 


Responsible-Changed-From-To: freebsd-bugs->iedowse 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Fri Aug 9 17:20:48 PDT 2002 
Responsible-Changed-Why:  
MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20436 
State-Changed-From-To: patched->closed 
State-Changed-By: iedowse 
State-Changed-When: Mon Sep 16 16:23:51 PDT 2002 
State-Changed-Why:  

Merged to stable now too. Thanks for the reminder! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20436 
>Unformatted:
