From 338d4420a4d15c9e26a6ab547fb0eb0fb7844228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 3 Feb 2005 18:28:36 +0000 Subject: [PATCH] Now InitCheck() returns the actual error code. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11236 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/kernel/boot/loader/Handle.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tests/kernel/boot/loader/Handle.cpp b/src/tests/kernel/boot/loader/Handle.cpp index e9f1b47877..8cd9380d50 100644 --- a/src/tests/kernel/boot/loader/Handle.cpp +++ b/src/tests/kernel/boot/loader/Handle.cpp @@ -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 #include #include +#include #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); }