Several follow-up changes required by the changes either to the VFS
syscalls or to the syscall mechanism (which exposed naming and parameter inconsistencies). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8704 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
383cdedbd2
commit
f57dcf3200
@ -780,7 +780,7 @@ register_image(image_t *image, int fd, const char *path)
|
||||
info.init_routine = (void *)image->init_routine;
|
||||
info.term_routine = (void *)image->term_routine;
|
||||
|
||||
if (_kern_read_stat(fd, &stat, sizeof(struct stat)) == B_OK) {
|
||||
if (_kern_read_stat(fd, NULL, false, &stat, sizeof(struct stat)) == B_OK) {
|
||||
info.device = stat.st_dev;
|
||||
info.node = stat.st_ino;
|
||||
} else {
|
||||
@ -819,7 +819,7 @@ load_container(char const *path, char const *name, image_type type)
|
||||
return found;
|
||||
}
|
||||
|
||||
fd = _kern_open(path, 0);
|
||||
fd = _kern_open(-1, path, 0);
|
||||
FATAL((fd < 0), "cannot open file %s\n", path);
|
||||
|
||||
len = _kern_read(fd, 0, &eheader, sizeof(eheader));
|
||||
|
@ -97,7 +97,7 @@ cmd_mkdir(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = _kern_create_dir(argv[1],0755);
|
||||
rc = _kern_create_dir(-1, argv[1], 0755);
|
||||
if (rc < 0) {
|
||||
printf("sys_mkdir() returned error: %s\n", strerror(rc));
|
||||
} else {
|
||||
|
@ -1015,7 +1015,7 @@ elf_load_user_image(const char *path, struct team *p, int flags, addr_t *entry)
|
||||
|
||||
dprintf("elf_load: entry path '%s', team %p\n", path, p);
|
||||
|
||||
fd = _kern_open(path, 0);
|
||||
fd = _kern_open(-1, path, 0);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
@ -1185,7 +1185,7 @@ load_kernel_add_on(const char *path)
|
||||
|
||||
TRACE(("elf_load_kspace: entry path '%s'\n", path));
|
||||
|
||||
fd = _kern_open(path, 0);
|
||||
fd = _kern_open(-1, path, 0);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
|
@ -1086,7 +1086,7 @@ set_port_owner(port_id id, team_id team)
|
||||
|
||||
|
||||
port_id
|
||||
user_create_port(int32 queueLength, const char *userName)
|
||||
_user_create_port(int32 queueLength, const char *userName)
|
||||
{
|
||||
char name[B_OS_NAME_LENGTH];
|
||||
|
||||
@ -1102,21 +1102,21 @@ user_create_port(int32 queueLength, const char *userName)
|
||||
|
||||
|
||||
status_t
|
||||
user_close_port(port_id id)
|
||||
_user_close_port(port_id id)
|
||||
{
|
||||
return close_port(id);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_delete_port(port_id id)
|
||||
_user_delete_port(port_id id)
|
||||
{
|
||||
return delete_port(id);
|
||||
}
|
||||
|
||||
|
||||
port_id
|
||||
user_find_port(const char *userName)
|
||||
_user_find_port(const char *userName)
|
||||
{
|
||||
char name[B_OS_NAME_LENGTH];
|
||||
|
||||
@ -1131,7 +1131,7 @@ user_find_port(const char *userName)
|
||||
|
||||
|
||||
status_t
|
||||
user_get_port_info(port_id id, struct port_info *userInfo)
|
||||
_user_get_port_info(port_id id, struct port_info *userInfo)
|
||||
{
|
||||
struct port_info info;
|
||||
status_t status;
|
||||
@ -1152,7 +1152,7 @@ user_get_port_info(port_id id, struct port_info *userInfo)
|
||||
|
||||
|
||||
status_t
|
||||
user_get_next_port_info(team_id team, int32 *userCookie, struct port_info *userInfo)
|
||||
_user_get_next_port_info(team_id team, int32 *userCookie, struct port_info *userInfo)
|
||||
{
|
||||
struct port_info info;
|
||||
status_t status;
|
||||
@ -1176,21 +1176,21 @@ user_get_next_port_info(team_id team, int32 *userCookie, struct port_info *userI
|
||||
|
||||
|
||||
ssize_t
|
||||
user_port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout)
|
||||
_user_port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout)
|
||||
{
|
||||
return port_buffer_size_etc(port, flags | B_CAN_INTERRUPT, timeout);
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
user_port_count(port_id port)
|
||||
_user_port_count(port_id port)
|
||||
{
|
||||
return port_count(port);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_read_port_etc(port_id port, int32 *userCode, void *userBuffer,
|
||||
_user_read_port_etc(port_id port, int32 *userCode, void *userBuffer,
|
||||
size_t bufferSize, uint32 flags, bigtime_t timeout)
|
||||
{
|
||||
int32 messageCode;
|
||||
@ -1212,14 +1212,14 @@ user_read_port_etc(port_id port, int32 *userCode, void *userBuffer,
|
||||
|
||||
|
||||
status_t
|
||||
user_set_port_owner(port_id port, team_id team)
|
||||
_user_set_port_owner(port_id port, team_id team)
|
||||
{
|
||||
return set_port_owner(port, team);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_write_port_etc(port_id port, int32 messageCode, void *userBuffer,
|
||||
_user_write_port_etc(port_id port, int32 messageCode, const void *userBuffer,
|
||||
size_t bufferSize, uint32 flags, bigtime_t timeout)
|
||||
{
|
||||
if (userBuffer == NULL)
|
||||
|
@ -942,7 +942,7 @@ sem_used_sems(void)
|
||||
|
||||
|
||||
sem_id
|
||||
user_create_sem(int32 count, const char *userName)
|
||||
_user_create_sem(int32 count, const char *userName)
|
||||
{
|
||||
char name[B_OS_NAME_LENGTH];
|
||||
|
||||
@ -958,49 +958,49 @@ user_create_sem(int32 count, const char *userName)
|
||||
|
||||
|
||||
status_t
|
||||
user_delete_sem(sem_id id)
|
||||
_user_delete_sem(sem_id id)
|
||||
{
|
||||
return delete_sem(id);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_delete_sem_etc(sem_id id, status_t return_code, bool interrupted)
|
||||
_user_delete_sem_etc(sem_id id, status_t return_code, bool interrupted)
|
||||
{
|
||||
return delete_sem_etc(id, return_code, interrupted);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_acquire_sem(sem_id id)
|
||||
_user_acquire_sem(sem_id id)
|
||||
{
|
||||
return user_acquire_sem_etc(id, 1, 0, 0);
|
||||
return _user_acquire_sem_etc(id, 1, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout)
|
||||
_user_acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout)
|
||||
{
|
||||
return acquire_sem_etc(id, count, flags | B_CAN_INTERRUPT, timeout);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_release_sem(sem_id id)
|
||||
_user_release_sem(sem_id id)
|
||||
{
|
||||
return release_sem_etc(id, 1, 0);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_release_sem_etc(sem_id id, int32 count, uint32 flags)
|
||||
_user_release_sem_etc(sem_id id, int32 count, uint32 flags)
|
||||
{
|
||||
return release_sem_etc(id, count, flags);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_get_sem_count(sem_id id, int32 *userCount)
|
||||
_user_get_sem_count(sem_id id, int32 *userCount)
|
||||
{
|
||||
status_t status;
|
||||
int32 count;
|
||||
@ -1017,7 +1017,7 @@ user_get_sem_count(sem_id id, int32 *userCount)
|
||||
|
||||
|
||||
status_t
|
||||
user_get_sem_info(sem_id id, struct sem_info *userInfo, size_t size)
|
||||
_user_get_sem_info(sem_id id, struct sem_info *userInfo, size_t size)
|
||||
{
|
||||
struct sem_info info;
|
||||
status_t status;
|
||||
@ -1034,7 +1034,7 @@ user_get_sem_info(sem_id id, struct sem_info *userInfo, size_t size)
|
||||
|
||||
|
||||
status_t
|
||||
user_get_next_sem_info(team_id team, int32 *userCookie, struct sem_info *userInfo,
|
||||
_user_get_next_sem_info(team_id team, int32 *userCookie, struct sem_info *userInfo,
|
||||
size_t size)
|
||||
{
|
||||
struct sem_info info;
|
||||
@ -1059,7 +1059,7 @@ user_get_next_sem_info(team_id team, int32 *userCookie, struct sem_info *userInf
|
||||
|
||||
|
||||
status_t
|
||||
user_set_sem_owner(sem_id id, team_id team)
|
||||
_user_set_sem_owner(sem_id id, team_id team)
|
||||
{
|
||||
return set_sem_owner(id, team);
|
||||
}
|
||||
|
@ -303,21 +303,21 @@ set_alarm(bigtime_t time, uint32 mode)
|
||||
|
||||
|
||||
bigtime_t
|
||||
user_set_alarm(bigtime_t time, uint32 mode)
|
||||
_user_set_alarm(bigtime_t time, uint32 mode)
|
||||
{
|
||||
return set_alarm(time, mode);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
user_send_signal(pid_t team, uint signal)
|
||||
_user_send_signal(pid_t team, uint signal)
|
||||
{
|
||||
return send_signal(team, signal);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
user_sigaction(int sig, const struct sigaction *userAction, struct sigaction *userOldAction)
|
||||
_user_sigaction(int sig, const struct sigaction *userAction, struct sigaction *userOldAction)
|
||||
{
|
||||
struct sigaction act, oact;
|
||||
int rc;
|
||||
|
@ -213,7 +213,7 @@ sysctl(int *name, uint namelen, void *oldp, size_t *oldlenp, void *newp, size_t
|
||||
|
||||
|
||||
int
|
||||
user_sysctl(int *name, uint namelen, void *oldp, size_t *oldlenp,
|
||||
_user_sysctl(int *name, uint namelen, void *oldp, size_t *oldlenp,
|
||||
void *newp, size_t newlen)
|
||||
{
|
||||
void *a1 = NULL, *a2 = NULL;
|
||||
|
@ -1090,7 +1090,7 @@ _user_get_current_team(void)
|
||||
|
||||
|
||||
int
|
||||
user_getenv(const char *userName, char **_userValue)
|
||||
_user_getenv(const char *userName, char **_userValue)
|
||||
{
|
||||
char name[SYS_THREAD_STRING_LENGTH_MAX];
|
||||
char *value;
|
||||
@ -1113,7 +1113,7 @@ user_getenv(const char *userName, char **_userValue)
|
||||
|
||||
|
||||
int
|
||||
user_setenv(const char *userName, const char *userValue, int overwrite)
|
||||
_user_setenv(const char *userName, const char *userValue, int overwrite)
|
||||
{
|
||||
char name[SYS_THREAD_STRING_LENGTH_MAX];
|
||||
char value[SYS_THREAD_STRING_LENGTH_MAX];
|
||||
|
Loading…
Reference in New Issue
Block a user