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/httpd/httpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/user/app/httpd') diff --git a/src/user/app/httpd/httpd.c b/src/user/app/httpd/httpd.c index 9141a39..2ffc2ba 100644 --- a/src/user/app/httpd/httpd.c +++ b/src/user/app/httpd/httpd.c @@ -21,7 +21,7 @@ static void handle(FILE *c) { char *end = strchr(path, ' '); if (end) *end = '\0'; - handle_t h = _syscall_open(path, strlen(path), OPEN_RO); + handle_t h = _syscall_open(path, strlen(path), OPEN_READ); if (h < 0) { fprintf(c, "HTTP/1.1 404 Not Found\r\n\r\n"); return; @@ -68,7 +68,7 @@ int main(int argc, char **argv) { const char *path = (argc > 1) ? argv[1] : "/net/listen/0.0.0.0/tcp/80"; handle_t conn; for (;;) { - conn = _syscall_open(path, strlen(path), 0); + conn = _syscall_open(path, strlen(path), OPEN_RW); if (conn < 0) { eprintf("open('%s') failed, %d", path, conn); return 1; -- cgit v1.2.3