Now InitCheck() returns the actual error code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11236 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2003-2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the OpenBeOS License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Handle.h"
|
#include "Handle.h"
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_READ_POS
|
#ifndef HAVE_READ_POS
|
||||||
@@ -37,8 +38,10 @@ Handle::Handle(const char *path)
|
|||||||
fPath(NULL)
|
fPath(NULL)
|
||||||
{
|
{
|
||||||
fHandle = open(path, O_RDONLY);
|
fHandle = open(path, O_RDONLY);
|
||||||
if (fHandle < B_OK)
|
if (fHandle < B_OK) {
|
||||||
|
fHandle = errno;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fPath = strdup(path);
|
fPath = strdup(path);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user