libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] [Patch] More bullet-proof drive detection for GNU/L


From: plaum
Subject: Re: [Libcdio-devel] [Patch] More bullet-proof drive detection for GNU/Linux
Date: Mon, 20 Nov 2006 23:13:07 +0100 (CET)
User-agent: SquirrelMail/1.4.8

Hi,

> For the record, SCSI-1 had up to 8 devices off of a chain and SCSI-2
> has up to 16 devices. It might have been that 0 was the address of the
> controller -  I don't know.

ok, so I can increase it further.

> Personally, I'm saddened by all of the nonesense that has to go on to
> do something simple like get a list of CD-ROM drives. There's gotta be
> a simpler way. HAL (Hardware Abstraction Layer)? Reading
> /proc/scsi/sg/devices and /proc/ide?  Again, I don't know. Parsing
> dmesg?

Parsing /sys could be an option.

For proc-interfaces, one would have to check, if they are compatible over
a wide range of kernel versions/configurations. AFAIK for some kernel
drivers, /proc support is optional.

Parsing dmesg can get messy especially if the kernel people decide
to change the format (even now, one can configure the kernel such that
each message is prepended by a timestamp).

I think the most portable way (for older kernels) is to check for
device files, so it would be needed anyway. But It's nonsense, I agree.

Burkhard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]