diff --git a/src/kernel/apps/rld/rldelf.c b/src/kernel/apps/rld/rldelf.c index af49c89c7f..ba58ed87a9 100644 --- a/src/kernel/apps/rld/rldelf.c +++ b/src/kernel/apps/rld/rldelf.c @@ -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)); diff --git a/src/kernel/apps/shell/commands.c b/src/kernel/apps/shell/commands.c index ab2538c025..4c51ad8459 100644 --- a/src/kernel/apps/shell/commands.c +++ b/src/kernel/apps/shell/commands.c @@ -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 { diff --git a/src/kernel/core/elf.c b/src/kernel/core/elf.c index 33aa07478c..58350de214 100644 --- a/src/kernel/core/elf.c +++ b/src/kernel/core/elf.c @@ -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; diff --git a/src/kernel/core/port.c b/src/kernel/core/port.c index 5605e5672d..c5588ac5b0 100644 --- a/src/kernel/core/port.c +++ b/src/kernel/core/port.c @@ -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) diff --git a/src/kernel/core/sem.c b/src/kernel/core/sem.c index d48ddf5461..d2dc85e123 100644 --- a/src/kernel/core/sem.c +++ b/src/kernel/core/sem.c @@ -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); } diff --git a/src/kernel/core/signal.c b/src/kernel/core/signal.c index 11a91860f2..8647b023c1 100644 --- a/src/kernel/core/signal.c +++ b/src/kernel/core/signal.c @@ -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; diff --git a/src/kernel/core/sysctl.c b/src/kernel/core/sysctl.c index 91af264a0c..a44ce13c14 100644 --- a/src/kernel/core/sysctl.c +++ b/src/kernel/core/sysctl.c @@ -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; diff --git a/src/kernel/core/team.c b/src/kernel/core/team.c index 6fb75ca303..22df02cb63 100644 --- a/src/kernel/core/team.c +++ b/src/kernel/core/team.c @@ -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];