open() error is reported in errno

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18676 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen
2006-08-28 20:32:18 +00:00
parent 92fdfb1106
commit 0d9075c677
@@ -13,6 +13,7 @@
#include <String.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#if DEBUG
FILE *KeyboardInputDevice::sLogFile = NULL;
@@ -425,7 +426,7 @@ KeyboardInputDevice::Start(const char *name, void *cookie)
keyboard_device *device = (keyboard_device *)cookie;
if ((device->fd = open(device->path, O_RDWR)) < B_OK) {
fprintf(stderr, "error when opening %s: %s\n", device->path, strerror(device->fd));
fprintf(stderr, "error when opening %s: %s\n", device->path, strerror(errno));
return B_ERROR;
}