summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/driver/fsroot.c
diff options
context:
space:
mode:
authordzwdz2022-06-29 21:52:15 +0200
committerdzwdz2022-06-29 21:52:15 +0200
commitbf4cbc830d78774ac00d9501c45e8b84d0ae9ae7 (patch)
treef302f92badf74dade9e724e37f85d1ee2dd99833 /src/kernel/arch/i386/driver/fsroot.c
parent43de6a4d8ead1e609828ef34ad1957d34c94ee6a (diff)
kernel/vfs: add the OPEN_CREATE flag
Diffstat (limited to 'src/kernel/arch/i386/driver/fsroot.c')
-rw-r--r--src/kernel/arch/i386/driver/fsroot.c2
1 files changed, 2 insertions, 0 deletions
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;