feat: twifs - pseudo file system for lunaix kernel state exposure
[lunaix-os.git] / lunaix-os / includes / lunaix / fs / twifs.h
diff --git a/lunaix-os/includes/lunaix/fs/twifs.h b/lunaix-os/includes/lunaix/fs/twifs.h
new file mode 100644 (file)
index 0000000..48b35b9
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __LUNAIX_TWIFS_H
+#define __LUNAIX_TWIFS_H
+
+#include <lunaix/fs.h>
+
+struct twifs_node
+{
+    struct hstr name;
+    uint32_t itype;
+    struct llist_header children;
+    struct llist_header siblings;
+    struct v_file_ops fops;
+};
+
+void
+twifs_init();
+
+struct twifs_node*
+twifs_child_node(struct twifs_node* parent, const char* name, int name_len);
+
+struct twifs_node*
+twifs_toplevel_node(const char* name, int name_len);
+
+#endif /* __LUNAIX_TWIFS_H */