[kernel] Only accept invalid handles for optional syscall args

The syscall helpers.h get_handle functions should be returing
j6_err_invalid_arg if the handle they're given is j6_handle_invalid,
unless explicitly set to optional.
This commit is contained in:
Justin C. Miller
2023-02-06 01:13:55 -08:00
parent 8966380ef9
commit 359ee035d8
4 changed files with 29 additions and 16 deletions

View File

@@ -41,7 +41,7 @@ int
channel_pump_loop()
{
j6_status_t result;
constexpr size_t buffer_size = 512;
static constexpr size_t buffer_size = 512;
char buffer[buffer_size];
j6_handle_t slp = j6_find_first_handle(j6_object_type_mailbox);