lib: fs: add library for implementing a filesystem service

This commit is contained in:
2026-03-06 20:17:23 +00:00
parent c4fd252f86
commit 5658e27445
15 changed files with 1506 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#ifndef FS_CONTEXT_H_
#define FS_CONTEXT_H_
#include <rosetta/fs.h>
struct fs_file;
struct fs_context;
struct fs_allocator;
struct fs_superblock;
extern struct fs_context *fs_context_create(
struct fs_allocator *alloc,
struct fs_superblock *sb);
extern void fs_context_destroy(struct fs_context *ctx);
extern struct fs_file *fs_context_open_file(
struct fs_context *ctx,
unsigned long id);
extern void fs_context_close_file(struct fs_context *ctx, struct fs_file *f);
extern struct fs_dentry *fs_context_resolve_path(
struct fs_context *ctx,
const char *path);
extern kern_status_t fs_context_dispatch_msg(
struct fs_context *ctx,
kern_handle_t channel,
struct msg_endpoint *sender,
struct msg_header *hdr);
#endif