diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/fs/path.h | 25 | ||||
| -rw-r--r-- | src/include/toxic/config.h | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/include/fs/path.h b/src/include/fs/path.h new file mode 100644 index 0000000..369e8b0 --- /dev/null +++ b/src/include/fs/path.h @@ -0,0 +1,25 @@ +#ifndef PATH_H +#define PATH_H + +/* + * Path structure follows unix format: + * + * /foo/bar/file + * + */ + +struct path_part { + const char *name; + struct path_part *next; +}; + +/* head is a linked list of all path components. + * the '/' is a component itself with name == NULL + */ +struct path_root { + int disk_id; + struct path_part *head; +}; + +struct path_root * parse_path(char *path); +#endif /* PATH_H */ diff --git a/src/include/toxic/config.h b/src/include/toxic/config.h index c1c1e7f..593eb2a 100644 --- a/src/include/toxic/config.h +++ b/src/include/toxic/config.h @@ -9,4 +9,8 @@ #define PAGE_SIZE (4096) #define SECTOR_SIZE (512) + +/* Path parsing */ +#define PATH_MAX (128) + #endif /* CONFIG_H */ |
