diff options
Diffstat (limited to 'src/include/fs/path.h')
| -rw-r--r-- | src/include/fs/path.h | 25 |
1 files changed, 25 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 */ |
