* 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:
@@ -28,7 +28,7 @@
|
|||||||
#include "IOSchedulerSimple.h"
|
#include "IOSchedulerSimple.h"
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_CD_DISK
|
//#define TRACE_CD_DISK
|
||||||
#ifdef TRACE_CD_DISK
|
#ifdef TRACE_CD_DISK
|
||||||
# define TRACE(x...) dprintf("scsi_cd: " x)
|
# define TRACE(x...) dprintf("scsi_cd: " x)
|
||||||
#else
|
#else
|
||||||
@@ -694,10 +694,9 @@ cd_init_device(void* _info, void** _cookie)
|
|||||||
{
|
{
|
||||||
cd_driver_info* info = (cd_driver_info*)_info;
|
cd_driver_info* info = (cd_driver_info*)_info;
|
||||||
|
|
||||||
// and get (initial) capacity
|
update_capacity(info);
|
||||||
status_t status = update_capacity(info);
|
// Get initial capacity, but ignore the result; we do not care
|
||||||
if (status != B_OK)
|
// whether or not a media is present
|
||||||
return status;
|
|
||||||
|
|
||||||
*_cookie = info;
|
*_cookie = info;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
@@ -1122,7 +1121,7 @@ cd_register_device(device_node* node)
|
|||||||
static status_t
|
static status_t
|
||||||
cd_init_driver(device_node* node, void** _cookie)
|
cd_init_driver(device_node* node, void** _cookie)
|
||||||
{
|
{
|
||||||
TRACE("cd_init_driver");
|
TRACE("cd_init_driver\n");
|
||||||
|
|
||||||
uint8 removable;
|
uint8 removable;
|
||||||
status_t status = sDeviceManager->get_attr_uint8(node, "removable",
|
status_t status = sDeviceManager->get_attr_uint8(node, "removable",
|
||||||
|
|||||||
Reference in New Issue
Block a user