On Sat, 2004-08-21 at 17:19, Lourens Veen wrote: > On Sat 21 August 2004 18:06, Albert Cahalan wrote: > > On Sat, 2004-08-21 at 14:28, Joerg Schilling wrote: > > > > > > Check the man page of cdrecord for a decription of the features > > > that are handled by /etc/default/cdrecord > > > > Hmmm, that's pretty good. > > > > Do you think you could make all the other programs > > use that file too? If I define my CD-RW as QueFire > > in that file, then "mount QueFire /mnt" had ought > > to mount it I think. Also, "dd if=QueFire" should > > read from the device, and "cat QueFire" too. It could > > get kind of confusing if I had a file named QueFire > > as well though. Perhaps there is a better solution? > > Uhhm, symlink? Just make a symlink /dev/FancyName (or wherever you > want to put it) and point it to the relevant device. I don't mount > /dev/hdc either, I mount /dev/cdrom. XMMS opens /dev/cdrom if it > plays an audio CD. If I decided to swap around my devices, I'd just > change the symlink and be done.
That makes "dd if=/dev/FancyName" work, and in fact is exactly what the Linux "udev" program sets up. The udev programs discovers devices by looking in the /sys filesystem when the system boots or when a hot-plug event happens. Then udev looks at the device (model, size, serialnum, and much more) to match it with a device that I've defined. It won't make "dd if=FancyName" work unless I put a symlink in every damn directory. I really don't mind having to use "/dev/", but I'd hate to have some programs needing it (basically everything) and some other programs (cdrecord at least) being different. It's nice to have a consistant user interface. > I'm don't know much about Solaris, > but I imagine mount, dd and cat work with device files there too, > which to dd and cat are just files to read from, and to mount are > just strings to be passed to the kernel mount command. You're right. It kind of makes sense. > Of course, this won't do anything for programs that actually send > SCSI command directly (like cdrecord et al), since they use > bus,target,lun triples. So you'd need a separate system for that, > like /etc/default/cdrecord or this NIS+. Well, you could actually use the device files on any modern UNIX-like system. It works for Solaris, Linux, HP-UX, OpenBSD, AIX, and IRIX. You just open the device file and send SCSI commands via an ioctl() or whatever. I'll bet the FreeBSD hackers would love a port of the OpenBSD code, if they haven't added the feature themselves already. It would be easy to use drive letters for Windows, since the cdrecord code is just making fake SCSI IDs out of the drive letters anyway. Probably the Windows users would like that better than the numbers, since the letters would match up with the rest of Windows. The nice thing about using device files or drive letters is that nobody has to change all the other programs to match. Only cdrecord would need to change, and the changes are pretty easy. I guess that MS-DOS and SCO OpenServer could keep using numbers. It's good to make SCO supporters suffer. Actually, dropping SCO support is kind of a duty. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

