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/iochk/iochk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/user/app/iochk') diff --git a/src/user/app/iochk/iochk.c b/src/user/app/iochk/iochk.c index 38e0473..92975be 100644 --- a/src/user/app/iochk/iochk.c +++ b/src/user/app/iochk/iochk.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -84,7 +85,7 @@ int main(int argc, char **argv) { for (; optind < argc; optind++) { const char *path = argv[optind]; verbosef("checking %s...\n", path); - handle_t h = _syscall_open(path, strlen(path), 0); + handle_t h = _syscall_open(path, strlen(path), OPEN_READ); if (h < 0) { eprintf("couldn't open %s", path); continue; -- cgit v1.2.3