Skip to content
Snippets Groups Projects
Commit bc2e8c29 authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #24 from ids1024/fcntl

Make fcntl not clobber access mode
parents 6965d67e 8c039299
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