diff options
-rw-r--r-- | storeio/storeio.c | 4 |
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); |