summaryrefslogtreecommitdiff
path: root/src/user/app/httpd/httpd.c
diff options
context:
space:
mode:
authordzwdz2022-10-02 19:25:17 +0200
committerdzwdz2022-10-02 19:25:17 +0200
commit710e9b2b5c16f74f66420c66d12455ad518d42c7 (patch)
tree82b88cc07ef3f122512354d649af68584bd4da4d /src/user/app/httpd/httpd.c
parent503d9ff758f8b83295830bdfc8c2ea56837d25e5 (diff)
syscall/open: add the full suite of READ/WRITE flags
Diffstat (limited to 'src/user/app/httpd/httpd.c')
-rw-r--r--src/user/app/httpd/httpd.c4
1 files changed, 2 insertions, 2 deletions
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;