Messages in this thread | | | Date | Thu, 15 Jul 1999 22:43:59 +0200 | From | Jens Axboe <> | Subject | Re: CD-ROM + Modem = errrr... |
| |
On Thu, Jul 15 1999, Thierry Vignaud wrote: > > Jens, I have the problem that: > > > > stat("/dev/hdc", {st_mode=S_IFIFO|S_ISGID|S_ISVTX, st_size=0, ...}) = 0 > > open("/dev/hdc", O_RDONLY) = -1 ERRNO_123 (No medium found) > > > > So that my boot script to change parameters does not work. hdparm is > > release 3.5. kernel 2.2.10. RH 6.0. I have to put a cdrom to let the > > driver accept -u 1. > > > > Am I doing something wrong? > > It means there is no cd in the cdrom drive. But if you type hdparm > /dev/cdrom, it should display something like: > /dev/cdrom: > HDIO_GET_MULTCOUNT failed: Paramètre invalide > I/O support = 0 (default 16-bit) > unmaskirq = 1 (on) > using_dma = 0 (off) > keepsettings = 0 (off) > HDIO_GET_NOWERR failed: Paramètre invalide > readonly = 1 (on) > readahead = 8 (on) > HDIO_GETGEO failed: Paramètre invalide > > The important line is "unmaskirq = 1 (on)" which said your command > has succeed. The errors came from that a cd does not behave like a hard > disk (it's not always present, it's read-only, it does'n support the > full eide commands but a subset named atapi , ...) > > So you have not doing something wrong. > Just don't check the hdparm result in your script or do a hdparm -qu > /dev/cdrom
On most drives the open() will fail and hdparm will then quit. Then the settings will not get updated.
> -- > MandrakeSoft http://www.mandrakesoft.com/ > --Thierry
-- * Jens Axboe <axboe@image.dk> * Linux CD-ROM Maintainer
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |