From 153ac5fa0b8c4d178bf7590f0344612c6c3eaa70 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sat, 3 Oct 2026 12:56:27 -0400 Subject: add SYSCALL_MESSAGE_SIZE --- sys/syscall_message.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sys/syscall_message.c (limited to 'sys/syscall_message.c') 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; + } +} -- cgit v1.2.3