mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
fcntl: fix file flags
This commit is contained in:
@@ -30,7 +30,8 @@ syscallret_t syscall_fcntl(context_t *, int fd, int cmd, uint64_t arg) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_GETFL:
|
case F_GETFL:
|
||||||
ret.ret = file->flags;
|
// decrement to convert internal read/write flags to O_RDONLY etc
|
||||||
|
ret.ret = file->flags - 1;
|
||||||
break;
|
break;
|
||||||
case F_SETFL:
|
case F_SETFL:
|
||||||
FILE_LOCK(file);
|
FILE_LOCK(file);
|
||||||
|
|||||||
Reference in New Issue
Block a user