diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-03 12:56:27 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-03 12:56:27 -0400 |
| commit | 153ac5fa0b8c4d178bf7590f0344612c6c3eaa70 (patch) | |
| tree | 5849f36c0c97ebc90148e772ce549c615b7ea44a /sys/syscall_message.c | |
| parent | 2497a94013261d6fa9159b9c6e94abe6f2d4fd9e (diff) | |
| download | jove-kernel-153ac5fa0b8c4d178bf7590f0344612c6c3eaa70.tar.gz jove-kernel-153ac5fa0b8c4d178bf7590f0344612c6c3eaa70.tar.bz2 jove-kernel-153ac5fa0b8c4d178bf7590f0344612c6c3eaa70.zip | |
add SYSCALL_MESSAGE_SIZE
Diffstat (limited to 'sys/syscall_message.c')
| -rw-r--r-- | sys/syscall_message.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/syscall_message.c b/sys/syscall_message.c new file mode 100644 index 0000000..5edf33f --- /dev/null +++ b/sys/syscall_message.c @@ -0,0 +1,16 @@ +#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; + } +} |
