Skip to content

Commit e06caf4

Browse files
taoryegeky
authored andcommitted
fix: correct block_count with block_size
BLKGETSIZE means `return device size /512 (long *arg)`
1 parent 987b2b7 commit e06caf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lfs_fuse_bd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int lfs_fuse_bd_create(struct lfs_config *cfg, const char *path) {
4646
if (err) {
4747
return -errno;
4848
}
49-
cfg->block_count = size;
49+
cfg->block_count = size * 512 / cfg->block_size;
5050
}
5151

5252
// setup function pointers

0 commit comments

Comments
 (0)