ARMmbed / dataflash-driver

Block device driver for DataFlash devices
Apache License 2.0
7 stars 4 forks source link

Increment erased block count in erase loop #7

Closed hesee closed 6 years ago

hesee commented 6 years ago

Erase() only erases one block. It looks like "erased" variable is erroneously decremented instead of increment. Underflows at first loop iteration.

6

geky commented 6 years ago

@marcuschangarm, does this look good to you?

marcuschangarm commented 6 years ago

Looks good! I'm concerned how it got into that state though. I had it running the file system tests locally which means I must have pushed the wrong branch somehow so who knows what else is missing? 😨

geky commented 6 years ago

Sounds good to me, @marcuschangarm, I don't think many filesystem operations need erase to erase more than one block. Though it is an issue if you erase the entire block device or something.

@hesee, Thanks for the contribution!

marcuschangarm commented 6 years ago

I don't think many filesystem operations need erase to erase more than one block.

Ah, ok! That's more comforting then.