aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/nullfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/user/nullfs.c')
-rw-r--r--src/kernel/user/nullfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/user/nullfs.c b/src/kernel/user/nullfs.c
index 0ca0073..a925ab5 100644
--- a/src/kernel/user/nullfs.c
+++ b/src/kernel/user/nullfs.c
@@ -218,7 +218,8 @@ bool nullfs_add_ram_file(fs_t *fs, const char* name, char* data, size_t init_sz,
f->data = data;
f->own_data = false;
}
- f->ok_modes = ok_modes;
+ f->ok_modes = ok_modes &
+ (FM_TRUNC | FM_READ | FM_WRITE); // no MMAP support
f->lock = MUTEX_UNLOCKED;
bool add_ok = nullfs_add_node(fs, name, f, &nullfs_f_ops);