return errno on open() error

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18906 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-09-21 13:17:35 +00:00
parent ee670e9ce2
commit 9da04493a9
5 changed files with 5 additions and 5 deletions

View File

@ -323,7 +323,7 @@ status_t CLONE_ACCELERANT(void *data) {
/* open the device, the permissions aren't important */
fd = open(path, B_READ_WRITE);
if (fd < 0) {
result = fd;
result = errno;
goto error0;
}

View File

@ -270,7 +270,7 @@ status_t CLONE_ACCELERANT(void *data) {
fclose(myhand);
/* abort with resultcode from open attempt on kerneldriver */
result = fd;
result = errno;
goto error0;
}

View File

@ -256,7 +256,7 @@ status_t CLONE_ACCELERANT( void *data )
// this will probably change once access right are checked properly
fd = open(path, B_READ_WRITE);
if( fd < 0 )
return fd;
return errno;
result = init_common( fd, 1 );
if( result != B_OK )

View File

@ -256,7 +256,7 @@ status_t CLONE_ACCELERANT(void *data) {
fclose(myhand);
/* abort with resultcode from open attempt on kerneldriver */
result = fd;
result = errno;
goto error0;
}

View File

@ -186,7 +186,7 @@ vesa_clone_accelerant(void *info)
int fd = open(path, B_READ_WRITE);
if (fd < 0)
return fd;
return errno;
status_t status = init_common(fd, true);
if (status != B_OK)