summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-15 12:06:40 -0400
committerIan Moffett <ian@osmora.org>2024-03-15 12:06:40 -0400
commit45547c3a0056ab5732c4ea1e01deee10749ecbcb (patch)
tree52c77cc3ea3bde439b4398f0476e27edc5f808d9
parent81e963b81a99f6b1176b2e316308cebe5f86d3c2 (diff)
kernel: vfs: Add fs capabilties
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/fs/initramfs.c1
-rw-r--r--sys/include/sys/mount.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/fs/initramfs.c b/sys/fs/initramfs.c
index 2a501a1..6da0929 100644
--- a/sys/fs/initramfs.c
+++ b/sys/fs/initramfs.c
@@ -173,6 +173,7 @@ static int
initramfs_init(struct fs_info *info)
{
initramfs = get_module("/boot/initramfs.tar", &initramfs_size);
+ info->caps = FSCAP_FULLPATH;
if (initramfs == NULL) {
panic("Failed to load initramfs\n");
diff --git a/sys/include/sys/mount.h b/sys/include/sys/mount.h
index 3ac7ec7..209fa3e 100644
--- a/sys/include/sys/mount.h
+++ b/sys/include/sys/mount.h
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/vnode.h>
+#include <sys/cdefs.h>
#define FS_NAME_MAX 16 /* Max length of FS type name including nul */
@@ -54,9 +55,15 @@ struct fs_info {
char name[FS_NAME_MAX]; /* Filesystem type name */
struct vfsops *vfsops; /* Filesystem operations */
struct mount *mp_root;
+ uint16_t caps;
};
/*
+ * Filesystem capabilities
+ */
+#define FSCAP_FULLPATH __BIT(0) /* Requires full path per lookup */
+
+/*
* Mount flags
*/
#define MNT_RDONLY 0x00000001