diff options
Diffstat (limited to 'sys/syscall_objdir.c')
| -rw-r--r-- | sys/syscall_objdir.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/syscall_objdir.c b/sys/syscall_objdir.c index 277639f..5a6786d 100644 --- a/sys/syscall_objdir.c +++ b/sys/syscall_objdir.c @@ -25,20 +25,15 @@ s_syscall_objdir_objtype( } int -_syscall_handle_objdir( - jove_owned_obj_t *pcb_obj, - jove_owned_obj_t *objdir, - jove_owned_obj_t *message_obj, - jove_owned_obj_t *target_obj, - struct syscall_header *header, - size_t bytes_left, - void *payload) +_syscall_handle_objdir(syscall_context_t *ctx) { - switch(header->callid) { + switch(ctx->header->callid) { case SYSCALL_OBJDIR_OBJTYPE: - return s_syscall_objdir_objtype(objdir, target_obj, bytes_left, payload); + if(ctx->target.permissions & SYSCALL_PERM_OBJDIR_OBJTYPE) + return s_syscall_objdir_objtype( + ctx->objdir, ctx->target.obj, ctx->bytes_left, ctx->payload); + return -EPERM; default: - kprintf("syscall_handle_objdir: Objdir does not support syscall %i\n", header->callid); - return EBADARG; + return -EBADCALL; } } |
