[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Autodetection of CD-ROM devices



On Fri Dec 17, 1999 at 01:42:05PM -0600, Chris Lawrence wrote:
>                                               Since the IDE system
> treats DVD-ROMs as CD-ROMs, they are properly detected (though it's
> possible /proc/ide/hd?/media may report "dvd-rom" or something else in
> 2.3+; I haven't checked).

For anything like DVD that goes through the ide-cdrom driver, it will
always say "cdrom" In ide-proc.c it just does a:

        switch (drive->media) {
                case ide_disk:  media = "disk\n";
                                break;
                case ide_cdrom: media = "cdrom\n";
                                break;
                case ide_tape:  media = "tape\n";
                                break;
                case ide_floppy:media = "floppy\n";
                                break;
                default:        media = "UNKNOWN\n";
                                break;
        }

which just checks which underlying _driver_ it uses.  You're safe. 

> Note the use of a bitmask for the IDE detection; SCSI devices are
> simply counted since they are numbered 0..n at boot time.  Non-IDE and
> non-SCSI CD-ROMs aren't handled at all.

Hmm. It would be easy to support those that go through the Uniform
cdrom driver by parsing the entries in the "drive name:" field of
/proc/sys/dev/cdrom/info, one entry per CD-ROM drive, but you are
probably right in not messing with them. When I ported the proprietary
CD-ROM drivers to using the Uniform interface, I did a quick survey,
and I only ported the ones that my survey revealed were in actual use
(ide-cd, scsi, cdu31a, mcd, mcdx, sbpcd). I suspect that these days,
most of these are probably now out of service.  Anybody can afford
the $10 it takes to buy a used ATAPI CD-ROM drive.

 -Erik
Former Linux CD-ROM maintainer

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--


Reply to: