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