From 5c76afb02530b031fee0b4b00b1bf43c28a9942a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 27 Sep 2010 17:16:46 +0000 Subject: [PATCH] * We need to ignore the result of update_capacity() in cd_init_device(), or else one cannot open the device anymore if no media is present - this did also let the disk device manager ignore CD-ROMs in case there was no media present during boot. This fixes bug #6130. * Disabled debug output again. * Fixed missing newline in debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38828 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp index 9f8de700f5..e01fd5ef6e 100644 --- a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp +++ b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp @@ -28,7 +28,7 @@ #include "IOSchedulerSimple.h" -#define TRACE_CD_DISK +//#define TRACE_CD_DISK #ifdef TRACE_CD_DISK # define TRACE(x...) dprintf("scsi_cd: " x) #else @@ -694,10 +694,9 @@ cd_init_device(void* _info, void** _cookie) { cd_driver_info* info = (cd_driver_info*)_info; - // and get (initial) capacity - status_t status = update_capacity(info); - if (status != B_OK) - return status; + update_capacity(info); + // Get initial capacity, but ignore the result; we do not care + // whether or not a media is present *_cookie = info; return B_OK; @@ -1122,7 +1121,7 @@ cd_register_device(device_node* node) static status_t cd_init_driver(device_node* node, void** _cookie) { - TRACE("cd_init_driver"); + TRACE("cd_init_driver\n"); uint8 removable; status_t status = sDeviceManager->get_attr_uint8(node, "removable",