diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-26 18:25:07 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-26 18:25:32 -0400 |
commit | 42ad59bdb6df99ccd146d6d67cb8c838be709ec5 (patch) | |
tree | 553958f50359acddb5a2bfbc6a10908e40c70f66 /sys/kern/kern_filedesc.c | |
parent | e9edee7206645adcd48b91aae6ef4734f2e98254 (diff) |
kernel: Add sys_close()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_filedesc.c')
-rw-r--r-- | sys/kern/kern_filedesc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c index c429125..6f59508 100644 --- a/sys/kern/kern_filedesc.c +++ b/sys/kern/kern_filedesc.c @@ -330,3 +330,13 @@ sys_open(struct syscall_args *args) dynfree(pathbuf); return ret; } + +/* + * arg0: fd + */ +uint64_t +sys_close(struct syscall_args *args) +{ + fd_close_fdnum(this_td(), args->arg0); + return 0; +} |