diff options
Diffstat (limited to 'src/user/lib/include/dirent.h')
-rw-r--r-- | src/user/lib/include/dirent.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/user/lib/include/dirent.h b/src/user/lib/include/dirent.h index 35ba1e9..7c419d7 100644 --- a/src/user/lib/include/dirent.h +++ b/src/user/lib/include/dirent.h @@ -1,20 +1,16 @@ #pragma once -#include <bits/panic.h> +#include <stdio.h> -typedef struct DIR DIR; struct dirent { ino_t d_ino; char d_name[256]; /* NAME_MAX + 1 */ }; -static inline DIR *opendir(const char *name) { - __libc_panic("unimplemented"); -} +typedef struct { + FILE *fp; + struct dirent dent; +} DIR; -static inline int closedir(DIR *dir) { - __libc_panic("unimplemented"); -} - -static inline struct dirent *readdir(DIR *dir) { - __libc_panic("unimplemented"); -} +DIR *opendir(const char *name); +int closedir(DIR *dir); +struct dirent *readdir(DIR *dir); |