Blob Blame History Raw
From a6679c0a0473323997b123d341c3bcbcf7136047 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Wed, 28 Feb 2018 14:28:00 +0100
Subject: [PATCH] cdrom: turn off autoclose by default.

References: bsc#1080813
Patch-mainline: Never, SUSE-specific

We ship system settings that turn off autoclose but before they are
applied a program might access the cdrom and lock up if the drive
returns bogus status. So patch the default to match the default sysctl
settings. Ultimately the status decoding should be fixed as well.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 drivers/cdrom/cdrom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index e7de36660bc4..bb48a13905ec 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -288,7 +288,7 @@
 /* used to tell the module to turn on full debugging messages */
 static bool debug;
 /* default compatibility mode */
-static bool autoclose=1;
+static bool autoclose = 0; /* we ship /usr/lib/sysctl.d/50-default.conf:dev.cdrom.autoclose = 0 */
 static bool autoeject;
 static bool lockdoor = 1;
 /* will we ever get to use this... sigh. */
-- 
2.13.6