Re: DNS-like idea for SCSI (NIS+ maybe)
On Sun, 2004-08-22 at 09:30, Joerg Schilling wrote:
> Albert Cahalan <albert@users.sourceforge.net> wrote:
>
> > > But it would make cdrecord itself inconsistent across platforms. It
> > > just depends on how you look at it.
> >
> > That would depend on the man page I think.
> > You could say "specify the device in the normal
> > way for your OS", and that would do nicely.
>
> This does not work. There are enough platforms that do not allow
> to send SCSI commands if you only have the "name" of the "device".
It looks like FreeBSD does indeed support this:
struct cam_device *cd;
// as regexp, can use any of "(/dev/)?cd0[a-h]?"
cd = cam_open_device("/dev/cd0c", O_RDWR);
For MacOS X, use these:
IOBSDNameMatching (/dev to IOService)
IOServiceOFPathToBSDName (IOService to /dev)
IOOpenFirmwarePathMatching (OpenFirmware to IOService)
(leaving NO non-dead platforms without support)
There are many platforms that do not allow to send SCSI
commands if you only have the bus,id,lun values. OpenBSD,
Linux, and Windows are this way. So that doesn't work either.
You can't even get the bus,id,lun triple sometimes, so
you've had make make up phony ones.
You could fake things the other way, to deal with the
few broken old OSes that won't accept SCSI commands
via the normal ("D:" or "/dev/sr0") device name.
Then again, those OSes have all been end-of-lifed.
It's kind of like dropping support for K&R compilers.
It lets you clean up your code. OH MY GOD! The 1970's
called; they want their C back. It's been 15 years
since the C standard was first ratified. It's been so
long now that the first standard is obsolete, and the
replacement has been out for 5 years.
Reply to: