You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
676 B
28 lines
676 B
#pragma once
|
|
|
|
struct mufs_dir {
|
|
struct mufs *fs;
|
|
struct mufs_tree *tree;
|
|
uint32_t va;
|
|
};
|
|
|
|
struct mufs_dtree {
|
|
uint32_t file_size;
|
|
uint32_t root;
|
|
uint8_t depth;
|
|
} __attribute__((packed));
|
|
|
|
struct mufs_dentry {
|
|
uint8_t type;
|
|
struct mufs_dtree tree;
|
|
uint16_t path_len;
|
|
} __attribute__((packed));
|
|
|
|
int resolve_path(struct mufs *fs, const char *path, struct mufs_tree **tree,
|
|
struct mufs_stat *stat);
|
|
size_t find_dirent_size(struct mufs *fs, struct mufs_tree *tree,
|
|
uint32_t va);
|
|
size_t read_dirent(struct mufs *fs, struct mufs_tree *tree,
|
|
struct mufs_dirent *dirent, uint32_t va);
|
|
size_t write_dirent(struct mufs_tree *tree,
|
|
uint32_t va, struct mufs_dirent *dirent);
|
|
|