mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +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
|
@ -78,12 +78,12 @@ KResult FileDescription::fstat(stat& buffer)
|
|||
{
|
||||
if (is_fifo()) {
|
||||
memset(&buffer, 0, sizeof(buffer));
|
||||
buffer.st_mode = 001000;
|
||||
buffer.st_mode = S_IFIFO;
|
||||
return KSuccess;
|
||||
}
|
||||
if (is_socket()) {
|
||||
memset(&buffer, 0, sizeof(buffer));
|
||||
buffer.st_mode = 0140000;
|
||||
buffer.st_mode = S_IFSOCK;
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue