Author: axeld Date: 2010-09-27 19:16:46 +0200 (Mon, 27 Sep 2010) New Revision: 38828 Changeset: http://dev.haiku-os.org/changeset/38828 Ticket: http://dev.haiku-os.org/ticket/6130 Modified: haiku/trunk/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp Log: * 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. Modified: haiku/trunk/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp 2010-09-27 15:26:41 UTC (rev 38827) +++ haiku/trunk/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp 2010-09-27 17:16:46 UTC (rev 38828) @@ -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_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 @@ 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",