summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index ff81e92..6731b31 100644
--- a/eval.c
+++ b/eval.c
@@ -626,7 +626,7 @@ bool eval_fls(const struct expr *expr, struct eval_state *state) {
}
uintmax_t ino = statbuf->ino;
- uintmax_t blocks = (statbuf->blocks + 1)/2;
+ uintmax_t blocks = ((uintmax_t)statbuf->blocks*BFS_STAT_BLKSIZE + 1023)/1024;
char mode[11];
format_mode(statbuf->mode, mode);
uintmax_t nlink = statbuf->nlink;
@@ -886,7 +886,7 @@ bool eval_sparse(const struct expr *expr, struct eval_state *state) {
return false;
}
- blkcnt_t expected = (statbuf->size + 511)/512;
+ blkcnt_t expected = (statbuf->size + BFS_STAT_BLKSIZE - 1)/BFS_STAT_BLKSIZE;
return statbuf->blocks < expected;
}