]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: (no-up) cdrom -- default to not locking the tray when in use
authorAndy Whitcroft <apw@canonical.com>
Thu, 11 Mar 2010 10:33:36 +0000 (10:33 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:32:30 +0000 (07:32 -0500)
BugLink: http://bugs.launchpad.net/bugs/397734
It seems that users are have a high expectation that the eject button
on their CDROM drive will eject the disk regardless of whether it is in
use or not.  To this end we are now changing the default LOCK mode for
mounted CDROMS to 0 to allow ejects.  This however does not handle the
direct open cases like music and video players.  From the launchpad bug
commentary:

    So, according to the upstream discussion David Zeuthen recommended
    to just not lock CD-ROM trays by default. Kernel/userspace already
    handles prematurely removed USB storage devices reasonably, and with
    read-only devices like CD-ROMs it is even less of an issue. So we
    should just set /proc/sys/dev/cdrom/lock to 0 by default.

Note that we still will have the drive mounted after the eject.  There is a
media change uevent generated and this will be used to trigger the unmount
of the drive in udisks.  The burner software will also have to be looked
at to ensure they are explicitly locking the drive closed during the burn.
This will all be handled under the bug above.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
drivers/cdrom/cdrom.c

index e36d160c458fdb334556129b9559d147aefb2472..a7f37f104d6cbdf69b6451ed8fd384e3fcb9ffdd 100644 (file)
@@ -289,7 +289,7 @@ static bool debug;
 /* default compatibility mode */
 static bool autoclose=1;
 static bool autoeject;
-static bool lockdoor = 1;
+static bool lockdoor = 0;
 /* will we ever get to use this... sigh. */
 static bool check_media_type;
 /* automatically restart mrw format */