buglet reading /proc/ide/(cdrom)/capacity

From: Adrian Bridgett
Date: Wed Aug 03 2005 - 16:16:43 EST


Just a minor buglet I've noticed /proc/ide/hdc/cdrom (where hdc is my
CDROM drive - Liteon 52x32x52).

If I cat this file while inserting the CDROM the command hangs, then
returns 304912 (fine).

If I insert a CDROM, then wait a while (say 30 seconds), then
it returns 304912 (also fine).

However if I insert a CDROM, then wait until the light stops flashing
(5 seconds) then I get: "0\n4912" like this:

cat //proc/ide/hdc/capacity | od -c
0000000 0 \n 4 9 1 2 \n

I've checked with another CD and it is the first two characters being
overwritten.

PS: I'm not currently subscribed to the list, so please Cc me.

Thanks,

Adrian
--
Email: adrian@xxxxxxxxxx -*- GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution -*- www.debian.org
Avoid working with children, animals and Microsoft "operating" systems
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/