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:
parent
7909881256
commit
338d4420a4
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
* Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "Handle.h"
|
||||
@ -14,6 +14,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
#ifndef HAVE_READ_POS
|
||||
@ -37,8 +38,10 @@ Handle::Handle(const char *path)
|
||||
fPath(NULL)
|
||||
{
|
||||
fHandle = open(path, O_RDONLY);
|
||||
if (fHandle < B_OK)
|
||||
if (fHandle < B_OK) {
|
||||
fHandle = errno;
|
||||
return;
|
||||
}
|
||||
|
||||
fPath = strdup(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user