[lkml]   [1999]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] pre8/asm-i386/string.h + de4x5 -> no go
    Matthew Kirkwood wrote:
    > > Hm, my drive can reliably detect if it has a medium in or not, but
    > > that still doesn't help it to eject tray.
    > >
    > > {atlas} [~/try]% eject --- (no medium)
    > > eject: open failed for `/dev/hdc': No medium found
    > I get this.
    > > {atlas} [~/try]% eject --- (medium in)
    > > eject: CDROMEJECT ioctl failed for `/dev/hdc': Operation not supported
    > But not this.

    If you don't open O_NONBLOCK cdrom tries to open the device for data
    and fails when no medium is inserted. You should be able to eject
    it fine (or issue other ioctl's), as long as you do that. strace of
    eject :

    open("/dev/hdb", O_RDONLY) = -1 ERRNO_123 (No medium found)


    fd = open("/dev/hdb", O_RDONLY | O_NONBLOCK);
    ioctl(fs, CDROMEJECT);

    works fine.

    * Jens Axboe <>
    * Linux CD-ROM Maintainer
    * "The only thing that interferes with my
    * learning is my education." -- A. Einstein

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:49    [W:0.020 / U:4.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site