mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
Kernel: Use symbolic constants for file modes
This fixes a bug where the mode of a FIFO was reported as 001000 instead of 0010000 (you see the difference? me nethier), and hopefully doesn't introduce new bugs. I've left 0777 and similar in a few places, because that is *more* readable than its symbolic version.
This commit is contained in:
parent
fd985b1f48
commit
e0d0d52455
5 changed files with 52 additions and 30 deletions
|
@ -108,6 +108,28 @@
|
|||
#define FUTEX_WAIT 1
|
||||
#define FUTEX_WAKE 2
|
||||
|
||||
#define S_IFMT 0170000
|
||||
#define S_IFDIR 0040000
|
||||
#define S_IFCHR 0020000
|
||||
#define S_IFBLK 0060000
|
||||
#define S_IFREG 0100000
|
||||
#define S_IFIFO 0010000
|
||||
#define S_IFLNK 0120000
|
||||
#define S_IFSOCK 0140000
|
||||
|
||||
#define S_ISUID 04000
|
||||
#define S_ISGID 02000
|
||||
#define S_ISVTX 01000
|
||||
#define S_IRUSR 0400
|
||||
#define S_IWUSR 0200
|
||||
#define S_IXUSR 0100
|
||||
#define S_IRGRP 0040
|
||||
#define S_IWGRP 0020
|
||||
#define S_IXGRP 0010
|
||||
#define S_IROTH 0004
|
||||
#define S_IWOTH 0002
|
||||
#define S_IXOTH 0001
|
||||
|
||||
/* c_cc characters */
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue