docs/reference/filesystem: Fix typo in block device code example.

This commit is contained in:
Daniel Mizyrycki 2019-12-06 08:28:36 -08:00 committed by Damien George
parent 2df6a0436d
commit 50dc5f10a6
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ interface (i.e. both signatures and behaviours of the
self.block_size = block_size self.block_size = block_size
self.data = bytearray(block_size * num_blocks) self.data = bytearray(block_size * num_blocks)
def readblocks(self, block, buf, offset=0): def readblocks(self, block_num, buf, offset=0):
addr = block_num * self.block_size + offset addr = block_num * self.block_size + offset
for i in range(len(buf)): for i in range(len(buf)):
buf[i] = self.data[addr + i] buf[i] = self.data[addr + i]