diff options
author | Anton Kling <anton@kling.gg> | 2023-11-22 21:06:33 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-22 21:06:33 +0100 |
commit | f0af695b6c3289a041e8fce8926721063796c596 (patch) | |
tree | 7575159d8efbb60ccf1762f2da3e126661f5c7bd /userland | |
parent | b3866b0442f55b97833981a99c601f2143d10315 (diff) |
Meta: Use dirent as a general include file
This include file is shared by the kernel and libc
Diffstat (limited to 'userland')
-rw-r--r-- | userland/libc/include/dirent.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/userland/libc/include/dirent.h b/userland/libc/include/dirent.h deleted file mode 100644 index 9f25cbf..0000000 --- a/userland/libc/include/dirent.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef DIRENT_H -#define DIRENT_H -#include <fcntl.h> -#include <limits.h> -#include <stddef.h> -#include <stdlib.h> -#include <sys/types.h> -#include <unistd.h> - -#define S_ISREG(_m) (_m & (STAT_REG)) -#define S_ISDIR(_m) (_m & (STAT_DIR)) - -struct dirent { - ino_t d_ino; // File serial number. - char d_name[PATH_MAX]; // Filename string of entry. -}; - -typedef struct { - int fd; - struct dirent internal_direntry; - int dir_num; -} DIR; - -DIR *opendir(const char *dirname); -struct dirent *readdir(DIR *dir); -int closedir(DIR *dirp); -int alphasort(const struct dirent **d1, const struct dirent **d2); -int scandir(const char *dir, struct dirent ***namelist, - int (*sel)(const struct dirent *), - int (*compar)(const struct dirent **, const struct dirent **)); -#endif |