lkml.org 
[lkml]   [2006]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Ubuntu PATCH] CDROMEJECT cannot eject some devices
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-03 23:12    [W:0.085 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site