2017-06-09 14:38:31 +02:00
|
|
|
#pragma once
|
|
|
|
|
2017-06-12 16:44:53 +02:00
|
|
|
struct mufs_dir {
|
|
|
|
struct mufs *fs;
|
|
|
|
struct mufs_tree *tree;
|
|
|
|
uint32_t va;
|
|
|
|
};
|
|
|
|
|
2017-06-11 16:31:43 +02:00
|
|
|
struct mufs_dtree {
|
2017-06-09 14:38:31 +02:00
|
|
|
uint32_t file_size;
|
|
|
|
uint32_t root;
|
|
|
|
uint8_t depth;
|
2017-06-11 16:31:43 +02:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
struct mufs_dentry {
|
|
|
|
uint8_t type;
|
|
|
|
struct mufs_dtree tree;
|
2017-06-09 14:38:31 +02:00
|
|
|
uint16_t path_len;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
2017-06-14 12:47:25 +02:00
|
|
|
int resolve_path(struct mufs *fs, const char *path, struct mufs_tree **tree,
|
2017-06-12 13:48:43 +02:00
|
|
|
struct mufs_stat *stat);
|
2017-06-14 06:20:11 +02:00
|
|
|
size_t find_dirent_size(struct mufs *fs, struct mufs_tree *tree,
|
|
|
|
uint32_t va);
|
2017-06-11 17:34:35 +02:00
|
|
|
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);
|