| Summary: | Can't make only cd0 under 4.1-STABLE | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Andre Albsmeier <Andre.Albsmeier> | ||||
| Component: | conf | Assignee: | iedowse | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.1-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Andre Albsmeier
2000-08-05 21:30:00 UTC
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
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 Responsible Changed From-To: freebsd-bugs->asmodai 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. 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.
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
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.
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
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 Move back to the doc pool. Responsible Changed From-To: freebsd-doc->freebsd-bugs This is not a doc PR. 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
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 Fixed in -current, awaiting MFC. Responsible Changed From-To: freebsd-bugs->iedowse MFC reminder. State Changed From-To: patched->closed Merged to stable now too. Thanks for the reminder! |