Kernel: Fix fcntl F_SETFL and masking

This commit is contained in:
2025-04-18 02:37:44 +03:00
parent 4cdf218145
commit d6667844de

View File

@@ -210,7 +210,7 @@ namespace Kernel
return m_open_files[fd].status_flags();
case F_SETFL:
extra &= O_APPEND | O_DSYNC | O_NONBLOCK | O_RSYNC | O_SYNC;
m_open_files[fd].status_flags() &= ~O_ACCMODE;
m_open_files[fd].status_flags() &= O_ACCMODE;
m_open_files[fd].status_flags() |= extra;
return 0;
default: