* 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
This commit is contained in:
Axel Dörfler
2010-09-27 17:16:46 +00:00
parent c8ccdf5203
commit 5c76afb025
@@ -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",