From 7107daa4b5baf4669eb4aa727a0a5df4b6dd1ed4 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Wed, 14 Jun 2017 06:18:02 +0200 Subject: [PATCH] mufs: flash_erase() operates on blocks rather than bytes --- source/fs/mufs/block.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/fs/mufs/block.c b/source/fs/mufs/block.c index 81ffe77..30d896a 100644 --- a/source/fs/mufs/block.c +++ b/source/fs/mufs/block.c @@ -74,8 +74,7 @@ int mufs_free_block(struct mufs *fs, uint32_t block) if (block < 1 + nbitmap_size) return -1; - flash_erase(fs->dev, block << fs->dev->log2_block_size, - 1 << fs->dev->log2_block_size); + flash_erase(fs->dev, block, 1); return mufs_mark_block(fs, block - 1 - nbitmap_size, 0); }