summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-02-01 04:00:17 +0000
committerRoland McGrath <roland@gnu.org>1999-02-01 04:00:17 +0000
commitf0ce51e710ae0982fd938c7155d07e0a017f72a2 (patch)
tree650dcf3375ed0696b902f510ebb65980c4110be6
parent92e02bab552228b4b50b4f7a436aa6008427b18a (diff)
1999-01-31 Roland McGrath <roland@baalperazim.frob.com>
* storeio.c (trivfs_modify_stat): Return S_IFCHR if block size is 1.
-rw-r--r--storeio/storeio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/storeio/storeio.c b/storeio/storeio.c
index 0dfa74a2..600fbb57 100644
--- a/storeio/storeio.c
+++ b/storeio/storeio.c
@@ -251,7 +251,9 @@ trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st)
}
st->st_mode &= ~S_IFMT;
- st->st_mode |= inhibit_cache ? S_IFCHR : S_IFBLK;
+ st->st_mode |= ((open->dev->inhibit_cache
+ || open->dev->store->block_size == 1)
+ ? S_IFCHR : S_IFBLK);
st->st_rdev = rdev;
if (readonly)
st->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);