Allocate the IOReq if not done yet at Open() time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39256 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -79,7 +79,12 @@ ExecDevice::AllocRequest(size_t requestSize)
|
||||
status_t
|
||||
ExecDevice::Open(const char *name, unsigned long unit, unsigned long flags)
|
||||
{
|
||||
status_t err;
|
||||
status_t err = B_OK;
|
||||
|
||||
if (fIORequest == NULL)
|
||||
err = AllocRequest(sizeof(struct IOStdReq));
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
err = exec_error(OpenDevice((uint8 *)name, unit, fIORequest, flags));
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user