HAL_Linux: re-fix dirty mask bug in Storage
when conversion to a single parent class was done it re-introduced a
bug that was fixed a while ago
See commit d238ff7c5d
This commit is contained in:
parent
330dab2fe3
commit
02581f4c05
@ -83,10 +83,10 @@ void LinuxStorage::_storage_open(void)
|
|||||||
void LinuxStorage::_mark_dirty(uint16_t loc, uint16_t length)
|
void LinuxStorage::_mark_dirty(uint16_t loc, uint16_t length)
|
||||||
{
|
{
|
||||||
uint16_t end = loc + length;
|
uint16_t end = loc + length;
|
||||||
while (loc < end) {
|
for (uint8_t line=loc>>LINUX_STORAGE_LINE_SHIFT;
|
||||||
uint8_t line = (loc >> LINUX_STORAGE_LINE_SHIFT);
|
line <= end>>LINUX_STORAGE_LINE_SHIFT;
|
||||||
_dirty_mask |= 1 << line;
|
line++) {
|
||||||
loc += LINUX_STORAGE_LINE_SIZE;
|
_dirty_mask |= 1U << line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user