summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-03-01 04:48:21 +0000
committerRoland McGrath <roland@gnu.org>2001-03-01 04:48:21 +0000
commitcd1a9b941ee45e1989e5ba826b5a5984eff15cbf (patch)
tree11c659752f0c9df3f909fdb8431c3c6f1023bbd7 /trans
parentade1805ad8cb424da60ee263e8e82310004a3a55 (diff)
2001-02-28 Roland McGrath <roland@frob.com>
* streamio.c (trivfs_modify_stat): Fix inverted sense of tests for O_READ, O_WRITE bits.
Diffstat (limited to 'trans')
-rw-r--r--trans/streamio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trans/streamio.c b/trans/streamio.c
index bc158e53..9019f208 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -423,12 +423,12 @@ trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st)
st->st_blksize = vm_page_size;
st->st_size = 0;
+ st->st_rdev = rdev;
st->st_mode &= ~S_IFMT;
st->st_mode |= S_IFCHR;
- st->st_rdev = rdev;
- if (trivfs_allow_open & O_READ)
+ if ((trivfs_allow_open & O_READ) == 0)
st->st_mode &= ~(S_IRUSR | S_IRGRP | S_IROTH);
- if (trivfs_allow_open & O_WRITE)
+ if ((trivfs_allow_open & O_WRITE) == 0)
st->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
}