From 710e9b2b5c16f74f66420c66d12455ad518d42c7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 2 Oct 2022 19:25:17 +0200 Subject: syscall/open: add the full suite of READ/WRITE flags --- src/user/app/shell/builtins.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/user/app/shell/builtins.c') diff --git a/src/user/app/shell/builtins.c b/src/user/app/shell/builtins.c index bc7731c..a23e501 100644 --- a/src/user/app/shell/builtins.c +++ b/src/user/app/shell/builtins.c @@ -1,5 +1,6 @@ #include "builtins.h" #include "shell.h" +#include #include #include #include @@ -60,7 +61,7 @@ void cmd_getsize(int argc, char **argv) { } for (int i = 1; i < argc; i++) { - handle_t h = _syscall_open(argv[i], strlen(argv[i]), 0); + handle_t h = _syscall_open(argv[i], strlen(argv[i]), OPEN_READ); if (h < 0) { eprintf("error opening %s", argv[i]); continue; -- cgit v1.2.3