Re: [Ubuntu PATCH] CDROMEJECT cannot eject some devices



On Mon, 2006-07-03 at 13:46 -0700, Randy Dunlap wrote:
- err = blk_send_start_stop(q, bd_disk, 0x02);
+ err = 0;
+
+ err |= blk_send_allow_medium_removal(q, bd_disk);

This piece is clearly wrong. If the medium has physically been locked
(and the lock is managed by the cdrom layer) then we don't want to be
overriding it. It should be up to the user or the tools to figure out
who has it open or mounted and take the appropriate action.

+ err |= blk_send_start_stop(q, bd_disk, 0x01);

And this looks unnecessary. Why does the device need to be started to
eject its medium?

+ err |= blk_send_start_stop(q, bd_disk, 0x02);

James


-
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/



Relevant Pages

  • Re: Can I lock text size in FrontPage text box?
    ... >I would like to lock the text size in the body of my website, ... > in Internet Explorer 6.0 from changing the text from medium to large or ... Or do I have create/save it as a gif file on the ...
    (microsoft.public.frontpage.programming)
  • Re: Eggs and even more eggs !
    ... On Tue, 20 Mar 2007 18:13:16 GMT, Bernadette wrote: ... Two stories today ..... ... Think I might have to lock away the 3 medium, ...
    (uk.people.silversurfers)
  • Re: Eggs and even more eggs !
    ... Two stories today ..... ... Think I might have to lock away the 3 medium, ... seems to be an echo in here:o)) ...
    (uk.people.silversurfers)
  • Re: D2006 Hyperthreading Win32
    ... locks for small, medium, and large allocations. ... If a request is unable to obtain a lock for the size it needs, it can try to obtain a lock for a larger size before waiting. ...
    (borland.public.delphi.non-technical)
  • Re: lstat returns bogus values.
    ... What should lstat return for a cdrom device node that has no medium? ... dereference the symlink:) ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)