Re: multiple cd devices

2000-01-03 Thread Ben Rosengart

On Fri, 31 Dec 1999, Wilko Bulte wrote:

 As for ample warning: I've seen MAKEDEVs display a list of the devices
 they are creating. I think the Tru64 version does this. I myself think this
 is a good behaviour (and hope people won't start yelling 'bloat' for once)

I like this idea a *lot*.

--
 Ben Rosengart

UNIX Systems Engineer, Skunk Group
StarMedia Network, Inc.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices (MAKEDEV)

2000-01-01 Thread Jordan K. Hubbard

Everything that sysinstall does WRT devs is abstracted by libdisk.


 On Fri, Dec 31, 1999 at 03:15:02PM -0500, Chuck Robey wrote:
  On Fri, 31 Dec 1999, Wilko Bulte wrote:
  
 Why are "certain" devices wildly different than all other ones?  I've
 never encountered that kind of syntax before, and I can't see that it
's
 documented anywhere at all.  Certainly, MAKEDEV itself (in it's
 comments) treats cd* just like all the others, specifying that the nu
mber
 following is a unit number, and *not* a quantity.  I don't know when 
this
 happened, but it's surely not obvious.  Not one word in the handbook,
 either.

*shrug*  This is the only rationality I could think of.  Obviously, thi
s
breaks POLA, so it should be changed (with ample warning).
   
   As for ample warning: I've seen MAKEDEVs display a list of the devices
   they are creating. I think the Tru64 version does this. I myself think th
is
   is a good behaviour (and hope people won't start yelling 'bloat' for once
)
  
  I'd like to hack about a bit on MAKEDEV, but I was wondering, does
  sysinstall, in any way, use MAKEDEV?  I *don't* want to mess with
  sysinstall!
 
 :) I guess the only way to find out short of studying sysinstall source code
 is asking Jordan.
 
 -- 
 Wilko Bulte   Arnhem, The Netherlands   - The FreeBSD Project 
   WWW : http://www.tcja.nl  http://www.freebsd.org
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-current" in the body of the message



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices (MAKEDEV)

2000-01-01 Thread Wilko Bulte

On Fri, Dec 31, 1999 at 03:15:02PM -0500, Chuck Robey wrote:
 On Fri, 31 Dec 1999, Wilko Bulte wrote:
 
Why are "certain" devices wildly different than all other ones?  I've
never encountered that kind of syntax before, and I can't see that it's
documented anywhere at all.  Certainly, MAKEDEV itself (in it's
comments) treats cd* just like all the others, specifying that the number
following is a unit number, and *not* a quantity.  I don't know when this
happened, but it's surely not obvious.  Not one word in the handbook,
either.
   
   *shrug*  This is the only rationality I could think of.  Obviously, this
   breaks POLA, so it should be changed (with ample warning).
  
  As for ample warning: I've seen MAKEDEVs display a list of the devices
  they are creating. I think the Tru64 version does this. I myself think this
  is a good behaviour (and hope people won't start yelling 'bloat' for once)
 
 I'd like to hack about a bit on MAKEDEV, but I was wondering, does
 sysinstall, in any way, use MAKEDEV?  I *don't* want to mess with
 sysinstall!

:) I guess the only way to find out short of studying sysinstall source code
is asking Jordan.

-- 
Wilko Bulte Arnhem, The Netherlands   - The FreeBSD Project 
WWW : http://www.tcja.nl  http://www.freebsd.org


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

2000-01-01 Thread Matthew D. Fuller

On Fri, Dec 31, 1999 at 01:45:31AM -0500, a little birdie told me
that Brian Fundakowski Feldman remarked
 The way certain devices, like cd with its monotonically increasing counter
 where devices are probed in order and assigned device based on precedence
 and not hardwiring/controller connection, work is consistent between
 the kernel and MAKEDEV.  If you have 2 cd devices, you have cd0 and cd1,
 so MAKEDEV accepts "cd2" for "two cd devices".  All CD devices work
 that way.  Disks don't, because there is potential for hard-wiring
 there, and will often be gaps.

FWIW, MAKEDEV for vty's (and pty's too?  dunno) works the same.




-- 
Matthew Fuller (MF4839) |[EMAIL PROTECTED]
Unix Systems Administrator  |[EMAIL PROTECTED]
Specializing in FreeBSD |http://www.over-yonder.net/

"The only reason I'm burning my candle at both ends, is because I
  haven't figured out how to light the middle yet"


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

1999-12-31 Thread Chris D. Faulhaber

On Fri, 31 Dec 1999, Chuck Robey wrote:

 On Fri, 31 Dec 1999, Brian Fundakowski Feldman wrote:
 
  The way certain devices, like cd with its monotonically increasing counter
  where devices are probed in order and assigned device based on precedence
  and not hardwiring/controller connection, work is consistent between
  the kernel and MAKEDEV.  If you have 2 cd devices, you have cd0 and cd1,
  so MAKEDEV accepts "cd2" for "two cd devices".  All CD devices work
  that way.  Disks don't, because there is potential for hard-wiring
  there, and will often be gaps.
 
 Why are "certain" devices wildly different than all other ones?  I've
 never encountered that kind of syntax before, and I can't see that it's
 documented anywhere at all.  Certainly, MAKEDEV itself (in it's
 comments) treats cd* just like all the others, specifying that the number
 following is a unit number, and *not* a quantity.  I don't know when this
 happened, but it's surely not obvious.  Not one word in the handbook,
 either.
 
 In fact, according to cd(4), you *can* specify the unit number:
 
 ... Prior to FreeBSD
 2.1, the first device found will be attached as cd0 the next, cd1, etc.
 Beginning in FreeBSD 2.1 it is possible to specify what cd unit a device
 should come on line as; refer to scsi(4) for details on kernel configura-
 tion.
 
 That makes this odd setup even odder.  Can't understand why this was done.
 

FWIW, bin/13768 asks the same questions.

-
Chris D. Faulhaber - [EMAIL PROTECTED] - [EMAIL PROTECTED]

FreeBSD: The Power To Serve   -   http://www.FreeBSD.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

1999-12-31 Thread Brian Fundakowski Feldman

On Fri, 31 Dec 1999, Chuck Robey wrote:

 On Fri, 31 Dec 1999, Brian Fundakowski Feldman wrote:
 
  The way certain devices, like cd with its monotonically increasing counter
  where devices are probed in order and assigned device based on precedence
  and not hardwiring/controller connection, work is consistent between
  the kernel and MAKEDEV.  If you have 2 cd devices, you have cd0 and cd1,
  so MAKEDEV accepts "cd2" for "two cd devices".  All CD devices work
  that way.  Disks don't, because there is potential for hard-wiring
  there, and will often be gaps.
 
 Why are "certain" devices wildly different than all other ones?  I've
 never encountered that kind of syntax before, and I can't see that it's
 documented anywhere at all.  Certainly, MAKEDEV itself (in it's
 comments) treats cd* just like all the others, specifying that the number
 following is a unit number, and *not* a quantity.  I don't know when this
 happened, but it's surely not obvious.  Not one word in the handbook,
 either.

*shrug*  This is the only rationality I could think of.  Obviously, this
breaks POLA, so it should be changed (with ample warning).

 
 In fact, according to cd(4), you *can* specify the unit number:
 
 ... Prior to FreeBSD
 2.1, the first device found will be attached as cd0 the next, cd1, etc.
 Beginning in FreeBSD 2.1 it is possible to specify what cd unit a device
 should come on line as; refer to scsi(4) for details on kernel configura-
 tion.
 
 That makes this odd setup even odder.  Can't understand why this was done.

So maybe it's just hysterical raisins.  I'm not saying I like the behavior,
just that I understand what that MAKEDEV behavior is.

 
 
 Chuck Robey| Interests include C  Java programming,
 New Year's Resolution:  I  | electronics, communications, and
 will not sphroxify gullible| signal processing.
 people into looking up | I run picnic.mat.net: FreeBSD-current(i386) and
 fictitious words in the|  jaunt.mat.net : FreeBSD-current(Alpha)|
 dictionary.|
 
 

-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

1999-12-31 Thread Jeroen C. van Gelderen

Bruce Evans wrote:
 
 On Fri, 31 Dec 1999, Chuck Robey wrote:
 
  Why are "certain" devices wildly different than all other ones?  I've
 
 Because the CAM update broke (SCSI) cd devices in rev.1.171 of MAKEDEV.
 mcd and scd were in the same case statement so they were broken too.  The
 breakage has spread to acd and ccd (although the latter is not a cdrom),
 but not to matcd or wcd or non-cdrom disks.

What about having
 ./MAKEDEV cd0 cd1 cd4 -da2 da6-da9
create cd0, cd1, cd4, da1, da2, da6, da7, da8, da9 ? This would be 
a generic solution that still allows for holes. Not possible because
of compatibility issues? I'm willing to give it a go.

Cheers,
Jeroen
-- 
Jeroen C. van Gelderen - [EMAIL PROTECTED]
Interesting read: http://www.vcnet.com/bms/ JLF


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

1999-12-31 Thread Peter Wemm

"Jeroen C. van Gelderen" wrote:
 Bruce Evans wrote:
  
  On Fri, 31 Dec 1999, Chuck Robey wrote:
  
   Why are "certain" devices wildly different than all other ones?  I've
  
  Because the CAM update broke (SCSI) cd devices in rev.1.171 of MAKEDEV.
  mcd and scd were in the same case statement so they were broken too.  The
  breakage has spread to acd and ccd (although the latter is not a cdrom),
  but not to matcd or wcd or non-cdrom disks.
 
 What about having
  ./MAKEDEV cd0 cd1 cd4 -da2 da6-da9
 create cd0, cd1, cd4, da1, da2, da6, da7, da8, da9 ? This would be 
 a generic solution that still allows for holes. Not possible because
 of compatibility issues? I'm willing to give it a go.

"Send patches" :-)

Seriously, the ultimate solution is a devfs-like system.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



multiple cd devices

1999-12-30 Thread Chuck Robey

I've been doing a lot of neatening up here, and one of the tasks was to
get both of the cdrom drives I have (one per machine) moved over so that
they are on the same machine.  This was so I can use the one that's a
writer in conjuntion with a reader, and do duplication.

Anyhow, getting the kernel to recognize cd1 was no problem, but getting
/dev/MAKEDEV to do that was a hairy PITA.  I couldn't locate, in either
cd(4) or cd(9), the information on the maj/min numbers, so that I could
just do the mknod's manually, and MAKEDEV would simply do nothing if I
entered './MAKEDEV cd1'.  After *much* screwing about, in desperation
(trying wierd combinations) I did a './MAKEDEV cd2', and *that* made my
cd1 devices (not the cd2 ones, but I didn't have a cd2, I didn't care).

This sounds pretty wrong, I think MAKEDEV is busted for this, right?  And,
if you don't want to have the actual maj/min numbers for the cd devices in
the man pages (because you want Unix unfriendly), well, shouldn't there be
a pointer to a include file that would be up to date with that info, so at
least the info is available somehow?

BTW, all the other MAKEDEV combinations, like cd*, cd1*, cd1a, etc, all
failed noisily, like:

ROOT:/dev:113 sh MAKEDEV cd1a
[: 1a: bad number
[: 1a: bad number



Chuck Robey| Interests include C  Java programming,
New Year's Resolution:  I  | electronics, communications, and
will not sphroxify gullible| signal processing.
people into looking up | I run picnic.mat.net: FreeBSD-current(i386) and
fictitious words in the|  jaunt.mat.net : FreeBSD-current(Alpha)|
dictionary.|




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

1999-12-30 Thread Brian Fundakowski Feldman

The way certain devices, like cd with its monotonically increasing counter
where devices are probed in order and assigned device based on precedence
and not hardwiring/controller connection, work is consistent between
the kernel and MAKEDEV.  If you have 2 cd devices, you have cd0 and cd1,
so MAKEDEV accepts "cd2" for "two cd devices".  All CD devices work
that way.  Disks don't, because there is potential for hard-wiring
there, and will often be gaps.

-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: multiple cd devices

1999-12-30 Thread Chuck Robey

On Fri, 31 Dec 1999, Brian Fundakowski Feldman wrote:

 The way certain devices, like cd with its monotonically increasing counter
 where devices are probed in order and assigned device based on precedence
 and not hardwiring/controller connection, work is consistent between
 the kernel and MAKEDEV.  If you have 2 cd devices, you have cd0 and cd1,
 so MAKEDEV accepts "cd2" for "two cd devices".  All CD devices work
 that way.  Disks don't, because there is potential for hard-wiring
 there, and will often be gaps.

Why are "certain" devices wildly different than all other ones?  I've
never encountered that kind of syntax before, and I can't see that it's
documented anywhere at all.  Certainly, MAKEDEV itself (in it's
comments) treats cd* just like all the others, specifying that the number
following is a unit number, and *not* a quantity.  I don't know when this
happened, but it's surely not obvious.  Not one word in the handbook,
either.

In fact, according to cd(4), you *can* specify the unit number:

... Prior to FreeBSD
2.1, the first device found will be attached as cd0 the next, cd1, etc.
Beginning in FreeBSD 2.1 it is possible to specify what cd unit a device
should come on line as; refer to scsi(4) for details on kernel configura-
tion.

That makes this odd setup even odder.  Can't understand why this was done.

 
 


Chuck Robey| Interests include C  Java programming,
New Year's Resolution:  I  | electronics, communications, and
will not sphroxify gullible| signal processing.
people into looking up | I run picnic.mat.net: FreeBSD-current(i386) and
fictitious words in the|  jaunt.mat.net : FreeBSD-current(Alpha)|
dictionary.|





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Sv: multiple cd devices

1999-12-30 Thread Leif Neland

From: Chuck Robey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 31, 1999 6:29 AM
Subject: multiple cd devices


 Anyhow, getting the kernel to recognize cd1 was no problem, but getting
 /dev/MAKEDEV to do that was a hairy PITA.  I couldn't locate, in either
 cd(4) or cd(9), the information on the maj/min numbers, so that I could
 just do the mknod's manually, and MAKEDEV would simply do nothing if I
 entered './MAKEDEV cd1'.  After *much* screwing about, in desperation
 (trying wierd combinations) I did a './MAKEDEV cd2', and *that* made my
 cd1 devices (not the cd2 ones, but I didn't have a cd2, I didn't care).
 
 This sounds pretty wrong, I think MAKEDEV is busted for this, right?  And,
 if you don't want to have the actual maj/min numbers for the cd devices in
 the man pages (because you want Unix unfriendly), well, shouldn't there be
 a pointer to a include file that would be up to date with that info, so at
 least the info is available somehow?
 
The philosophy (sp?) of the numbers to MAKEDEV seems a little inconsistent.
MAKEDEV wd10 makes 
wd10wd10b   wd10d   wd10f   wd10h   wd10s2  wd10s4
wd10a   wd10c   wd10e   wd10g   wd10s1  wd10s3

But makedev cd  makes the number of devices you want, not the last device number.

So if you do MAKEDEV cd10, you get 10 devices: cd0 to cd9.

However, MAKEDEV seems a little buggy, when dealing with _many_ cd-devices.

MAKEDEV cd31 makes cd0-30
 # ./MAKEDEV cd32
cd32 is invalid -- can't have more than 32 cd devices

Also, when RE-making more than 10 devices, it complains:

chgrp: cd10a: No such file or directory
chgrp: cd10c: No such file or directory
chgrp: cd11a: No such file or directory
...
chgrp: cd29c: No such file or directory
chgrp: cd30a: No such file or directory
chgrp: cd30c: No such file or directory

This only happens if the devices exist already. But the devices still change 
timestamps.

But I guess only a few people actually has more than 9 cd drives in one box...

I have made paches, will send-pr, when I've made sure I have mergemaster'ed my 
"production" box, it's running a week old or so current, but for some strange reason 
MAKEDEV isn't being installed by default.

Leif



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message