diff options
author | Anton Kling <anton@kling.gg> | 2023-11-20 00:41:29 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-20 00:41:29 +0100 |
commit | b353808b13db85abbbc0c3331c04c778620ed017 (patch) | |
tree | 49c1b4e7f2483f60ab3df77185db33b2dbf0e0ec /userland | |
parent | 188fab6274b08423b71399f6f5237eedb1fe916d (diff) |
LibC: Add macros for file regnition
Diffstat (limited to 'userland')
-rw-r--r-- | userland/libc/include/dirent.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/userland/libc/include/dirent.h b/userland/libc/include/dirent.h index f190a7c..eda2b04 100644 --- a/userland/libc/include/dirent.h +++ b/userland/libc/include/dirent.h @@ -7,6 +7,12 @@ #include <sys/types.h> #include <unistd.h> +#define STAT_REG 0 +#define STAT_DIR 1 + +#define S_ISREG(_m) (_m & (1 << STAT_REG)) +#define S_ISDIR(_m) (_m & (1 << STAT_DIR)) + struct dirent { ino_t d_ino; // File serial number. char d_name[PATH_MAX]; // Filename string of entry. |