Luna/libc/include/bits/modes.h
apio 13c9caa856
All checks were successful
continuous-integration/drone/push Build is passing
kernel+libc: Add stat() + fstat()
2023-04-10 19:56:03 +02:00

32 lines
672 B
C

/* bits/modes.h: S_* constants for stat(), mkdir(), open() and more. */
#ifndef _BITS_MODES_H
#define _BITS_MODES_H
#define S_IFMT 070000
#define S_IFREG 000000
#define S_IFDIR 040000
#define S_IFCHR 050000
#define S_ISREG(mode) ((mode)&S_IFMT == S_IFREG)
#define S_ISDIR(mode) ((mode)&S_IFMT == S_IFDIR)
#define S_ISCHR(mode) ((mode)&S_IFMT == S_IFCHR)
#define S_IRWXU 0700
#define S_IRUSR 0400
#define S_IWUSR 0200
#define S_IXUSR 0100
#define S_IRWXG 070
#define S_IRGRP 040
#define S_IWGRP 020
#define S_IXGRP 010
#define S_IRWXO 07
#define S_IROTH 04
#define S_IWOTH 02
#define S_IXOTH 01
#define S_ISUID 04000
#define S_ISGID 02000
#define S_ISVTX 01000
#endif