Fixed build of libbeadapter.so and libopenbeos.so.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11214 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-02-02 13:40:19 +00:00
parent 102267997c
commit c02a7b0dcb
1 changed files with 9 additions and 4 deletions

View File

@ -7,6 +7,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <Directory.h>
#include <Entry.h>
@ -16,6 +17,8 @@
#include <syscalls.h>
mode_t __gUmask = S_IUMSK;
enum {
FD_TYPE_UNKNOWN,
FD_TYPE_DIR,
@ -176,8 +179,9 @@ get_path(int fd, const char *relPath, BPath &path)
}
// _kern_open
extern "C"
int
_kern_open(int fd, const char *path, int omode)
_kern_open(int fd, const char *path, int omode, int permissions)
{
status_t error;
BPath fullPath;
@ -191,7 +195,7 @@ _kern_open(int fd, const char *path, int omode)
path = fullPath.Path();
}
// open the file
int result = open(path, omode);
int result = open(path, omode, permissions);
if (result < 0)
return errno;
return result;
@ -201,7 +205,8 @@ _kern_open(int fd, const char *path, int omode)
// _kern_open_entry_ref
extern "C"
int
_kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode)
_kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode,
int permissions)
{
BPath fullPath;
node_ref ref;
@ -216,7 +221,7 @@ _kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode)
if (error != B_OK)
return error;
// open the file
int fd = open(fullPath.Path(), omode);
int fd = open(fullPath.Path(), omode, permissions);
if (fd < 0)
return errno;
return fd;