From bf4cbc830d78774ac00d9501c45e8b84d0ae9ae7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 29 Jun 2022 21:52:15 +0200 Subject: kernel/vfs: add the OPEN_CREATE flag --- src/kernel/arch/i386/driver/fsroot.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kernel/arch/i386/driver/fsroot.c') diff --git a/src/kernel/arch/i386/driver/fsroot.c b/src/kernel/arch/i386/driver/fsroot.c index e6e53cd..4207541 100644 --- a/src/kernel/arch/i386/driver/fsroot.c +++ b/src/kernel/arch/i386/driver/fsroot.c @@ -47,6 +47,8 @@ static int handle(struct vfs_request *req) { assert(req->caller); switch (req->type) { case VFSOP_OPEN: + if (req->flags & OPEN_CREATE) return -1; + if (exacteq(req, "/")) return HANDLE_ROOT; if (exacteq(req, "/vga")) return HANDLE_VGA; -- cgit v1.2.3