#include "api/error.h" #include "sys/message.h" #include "sys/syscall.h" int _syscall_handle_message(syscall_context_t *ctx) { switch(ctx->header->callid) { case SYSCALL_OBJDIR_OBJTYPE: if(ctx->target.permissions & SYSCALL_PERM_OBJDIR_OBJTYPE) return message_len(ctx->message.obj); return -EPERM; default: return -EBADCALL; } }