Change address subtraction when moving through block devices to be the size of the entire block device not the block size

pull/5427/head
Kevin Gilbert 2017-10-24 18:30:50 -05:00 committed by Martin Kojtal
parent 63dc29d816
commit 48e87a09f6
1 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ int ChainingBlockDevice::read(void *b, bd_addr_t addr, bd_size_t size)
size -= read; size -= read;
} }
addr -= size; addr -= bdsize;
} }
return 0; return 0;
@ -140,7 +140,7 @@ int ChainingBlockDevice::program(const void *b, bd_addr_t addr, bd_size_t size)
size -= program; size -= program;
} }
addr -= size; addr -= bdsize;
} }
return 0; return 0;
@ -169,7 +169,7 @@ int ChainingBlockDevice::erase(bd_addr_t addr, bd_size_t size)
size -= erase; size -= erase;
} }
addr -= size; addr -= bdsize;
} }
return 0; return 0;