diff options
author | dzwdz | 2022-07-30 20:18:51 +0200 |
---|---|---|
committer | dzwdz | 2022-07-30 20:18:51 +0200 |
commit | fdeac40f867ca0c43ade53cce4b77bb146b10aae (patch) | |
tree | 9845e8708cb12d7e27a633d37a83b40eab7ea396 /src/user/lib/fs/dir.h | |
parent | b26399ad055aae9ef4b01694967515235568cd85 (diff) |
user/fs: create a shared library for handling directory reads
Diffstat (limited to 'src/user/lib/fs/dir.h')
-rw-r--r-- | src/user/lib/fs/dir.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/user/lib/fs/dir.h b/src/user/lib/fs/dir.h new file mode 100644 index 0000000..1a8c7f5 --- /dev/null +++ b/src/user/lib/fs/dir.h @@ -0,0 +1,14 @@ +#pragma once +#include <stdbool.h> +#include <stddef.h> + +struct dirbuild { + long offset; + char *buf; + long bpos, blen; + long error; +}; + +void dir_start(struct dirbuild *db, long offset, char *buf, size_t buflen); +bool dir_append(struct dirbuild *db, const char *name); +long dir_finish(struct dirbuild *db); |