Re: CD-ROM problems in at least 2.6.2-rc1-mm2 and above

From: Andries Brouwer
Date: Mon Feb 09 2004 - 15:58:51 EST


On Mon, Feb 09, 2004 at 03:44:03PM -0500, Ari Pollak wrote:

> The attached program for manually locking the CD-ROM tray used to work
> in 2.6.0 and 2.6.1, and possibly some earlier versions of 2.6.2 when
> called like "cd-lock /dev/hdc", where hdc is my CD-ROM drive. However,
> under 2.6.2-rc1-mm2 and 2.6.2-mm1, calling the program with an empty
> drive (which used to work) results in the following:
>
> open failed: No medium found

> open("/dev/cdrom", O_RDONLY) = -1 ENOMEDIUM (No medium found)

Things will work better with
open("/dev/cdrom", O_RDONLY | O_NONBLOCK);
-
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/