diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-01 04:06:53 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-01 04:08:28 -0400 |
commit | 35c6690e0b1611134de032c281976a62e4d2c9fd (patch) | |
tree | 8c696539b1950ebd343cad20610236c7e6e91925 | |
parent | f9e20df86de8fd8806e139000b31147ce1dcd8ec (diff) |
kernel: tmpfs: Add 'mode' field to tmpfs nodes
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/fs/tmpfs.c | 1 | ||||
-rw-r--r-- | sys/include/fs/tmpfs.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/tmpfs.c b/sys/fs/tmpfs.c index 5f8e531..895e1fa 100644 --- a/sys/fs/tmpfs.c +++ b/sys/fs/tmpfs.c @@ -212,6 +212,7 @@ tmpfs_create(struct vop_create_args *args) np->dirvp = dirvp; np->type = TMPFS_REG; np->real_size = 0; + np->mode = 0700; memcpy(np->rpath, pcp, strlen(pcp) + 1); TAILQ_INSERT_TAIL(&root_np->dirents, np, link); diff --git a/sys/include/fs/tmpfs.h b/sys/include/fs/tmpfs.h index ca24060..acb5256 100644 --- a/sys/include/fs/tmpfs.h +++ b/sys/include/fs/tmpfs.h @@ -55,6 +55,7 @@ struct tmpfs_node; * @len: Length of buffer * @real_size: Actual size of file * @data: The backing file data + * @mode: File permissions * @dirvp: Vnode of the parent node * @vp: Vnode of the current node * @lock: Lock protecting this node @@ -65,6 +66,7 @@ struct tmpfs_node { size_t len; size_t real_size; void *data; + mode_t mode; struct vnode *dirvp; struct vnode *vp; struct spinlock lock; |