Merge fat16_inode_t and fat16_node_t, make fs_node_t shared

This commit is contained in:
2026-07-15 23:14:56 +03:00
parent 1ff38ffad4
commit 4ad32dda17
10 changed files with 248 additions and 252 deletions
+6 -6
View File
@@ -5,21 +5,23 @@
#define FILENAME_SIZE_LIMIT 255
typedef struct fs_node {
uint8_t type;
uint32_t refs;
char name[FILENAME_SIZE_LIMIT + 1];
uint32_t size;
uint8_t is_dir;
uint8_t type;
uint8_t removed;
} fs_node_t;
fs_node_t *fs_mount();
fs_node_t *fs_open_root();
fs_node_t *fs_open_by(const fs_node_t *directory, const char *name, uint64_t flags);
fs_node_t *fs_open_at(const fs_node_t *directory, uint16_t index, uint64_t flags);
fs_node_t *fs_open_again(const fs_node_t *source);
fs_node_t *fs_open_again(fs_node_t *source);
stream_t *fs_open_stream(const fs_node_t *source);
stream_t *fs_open_stream(fs_node_t *source);
void fs_read(const fs_node_t *file, uint32_t offset, uint32_t bytes, void *to);
@@ -30,5 +32,3 @@ void fs_truncate(fs_node_t *file, uint32_t size);
void fs_remove(fs_node_t *file);
void fs_close(fs_node_t *node);
void fs_unmount(fs_node_t *fs);