@@ -85,19 +85,19 @@ static int lfs_totype(int type)
85
85
static int lfs_bd_read (const struct lfs_config *c, lfs_block_t block,
86
86
lfs_off_t off, void *buffer, lfs_size_t size) {
87
87
BlockDevice *bd = (BlockDevice *)c->context ;
88
- return bd->read (buffer, block*c->block_size + off, size);
88
+ return bd->read (buffer, ( bd_addr_t ) block*c->block_size + off, size);
89
89
}
90
90
91
91
static int lfs_bd_prog (const struct lfs_config *c, lfs_block_t block,
92
92
lfs_off_t off, const void *buffer, lfs_size_t size) {
93
93
BlockDevice *bd = (BlockDevice *)c->context ;
94
- return bd->program (buffer, block*c->block_size + off, size);
94
+ return bd->program (buffer, ( bd_addr_t ) block*c->block_size + off, size);
95
95
}
96
96
97
97
static int lfs_bd_erase (const struct lfs_config *c, lfs_block_t block)
98
98
{
99
99
BlockDevice *bd = (BlockDevice *)c->context ;
100
- return bd->erase (block*c->block_size , c->block_size );
100
+ return bd->erase (( bd_addr_t ) block*c->block_size , c->block_size );
101
101
}
102
102
103
103
static int lfs_bd_sync (const struct lfs_config *c)
0 commit comments