From cd1a9b941ee45e1989e5ba826b5a5984eff15cbf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 1 Mar 2001 04:48:21 +0000 Subject: 2001-02-28 Roland McGrath * streamio.c (trivfs_modify_stat): Fix inverted sense of tests for O_READ, O_WRITE bits. --- trans/streamio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'trans/streamio.c') 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); } -- cgit v1.2.3