Fix file mode in statbuf structure

This commit is contained in:
EnderIce2 2024-03-28 01:31:47 +02:00
parent 6d2c04d0c8
commit ac658beb5b
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -497,7 +497,7 @@ namespace vfs
Node *node = file->node;
statbuf->st_dev = 0; /* FIXME: stub */
statbuf->st_ino = node->IndexNode;
statbuf->st_mode = node->Type | node->Mode;
statbuf->st_mode = node->Type | (node->Mode & ~S_IFMT);
statbuf->st_nlink = 0; /* FIXME: stub */
statbuf->st_uid = node->UserIdentifier;
statbuf->st_gid = node->GroupIdentifier;
@ -521,7 +521,7 @@ namespace vfs
Node *node = fd.Handle->node;
statbuf->st_dev = 0; /* FIXME: stub */
statbuf->st_ino = node->IndexNode;
statbuf->st_mode = node->Type | node->Mode;
statbuf->st_mode = node->Type | (node->Mode & ~S_IFMT);
statbuf->st_nlink = 0; /* FIXME: stub */
statbuf->st_uid = node->UserIdentifier;
statbuf->st_gid = node->GroupIdentifier;
@ -552,7 +552,7 @@ namespace vfs
Node *node = file->node;
statbuf->st_dev = 0; /* FIXME: stub */
statbuf->st_ino = node->IndexNode;
statbuf->st_mode = node->Type | node->Mode;
statbuf->st_mode = node->Type | (node->Mode & ~S_IFMT);
statbuf->st_nlink = 0; /* FIXME: stub */
statbuf->st_uid = node->UserIdentifier;
statbuf->st_gid = node->GroupIdentifier;