Skip to content
Snippets Groups Projects
Unverified Commit 8c039299 authored by Ian Douglas Scott's avatar Ian Douglas Scott
Browse files

Make fcntl not clobber access mode

parent 6965d67e
No related branches found
No related tags found
No related merge requests found
......@@ -190,7 +190,7 @@ impl Resource for FileResource {
match cmd {
F_GETFL => Ok(self.flags),
F_SETFL => {
self.flags = arg & ! O_ACCMODE;
self.flags = (self.flags & O_ACCMODE) | (arg & ! O_ACCMODE);
Ok(0)
},
_ => Err(Error::new(EINVAL))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment