CDROM question

Bruce Dawson jbd at codemeta.com
Mon Aug 9 18:56:01 EDT 2004


On Mon, 2004-08-09 at 16:59, Cole Tuininga wrote:
> On Mon, 2004-08-09 at 16:28, Bruce Dawson wrote:
> > If /proc/ide/hdb/capacity contains a non-zero number, then there's a CD
> > in the drive. (Assuming you have a cd drive at /dev/hdb). This appears
> > to work for both audio and data cdroms.
> 
> Interesting trick, but it seems to react differently on my system.

I'm using kernels 2.4.20-27.7 and  2.4.20-31.9. What kernel you?

> With no media in the drive:
> 
> trogdor:/proc/ide/ide1/hdc# cat capacity
> 2147483647

Hmmm. That seems to be -1 modulo 2^31. Odd. I think you discovered a bug
somewhere. Or someone changed how error handling works.

> I have hdc available through the ide-scsi module - would that make a
> difference?

Possibly, but your observed behavior would still indicate a bug
somewhere.

--Bruce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20040809/db96ce01/attachment.bin


More information about the gnhlug-discuss mailing list