vfs: fix flags conversion on open()
The vfs converts the read/write flags from 0/1/2 (read-only/write-only/rw) to
bit fields which are more easily testable. But in doing so it corrupts the
other flags.
Fix FFLAGS and OFLAGS to preserve those other flags. The test for a file
that is not readable or writable is dropped, since it is impossible to fail.
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
Loading
Please register or sign in to comment