Skip to content

Commit 48e87a0

Browse files
kegilbert0xc0170
authored andcommitted
Change address subtraction when moving through block devices to be the size of the entire block device not the block size
1 parent 63dc29d commit 48e87a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

features/filesystem/bd/ChainingBlockDevice.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int ChainingBlockDevice::read(void *b, bd_addr_t addr, bd_size_t size)
109109
size -= read;
110110
}
111111

112-
addr -= size;
112+
addr -= bdsize;
113113
}
114114

115115
return 0;
@@ -140,7 +140,7 @@ int ChainingBlockDevice::program(const void *b, bd_addr_t addr, bd_size_t size)
140140
size -= program;
141141
}
142142

143-
addr -= size;
143+
addr -= bdsize;
144144
}
145145

146146
return 0;
@@ -169,7 +169,7 @@ int ChainingBlockDevice::erase(bd_addr_t addr, bd_size_t size)
169169
size -= erase;
170170
}
171171

172-
addr -= size;
172+
addr -= bdsize;
173173
}
174174

175175
return 0;

0 commit comments

Comments
 (0)