mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Rework DiskDevice's read() and write() to be non-virtual wrappers.
This way subclasses only have to implement readBlock() and writeBlock(). read() and write() require that the offset and length are both divisible by the blockSize().
This commit is contained in:
@@ -965,8 +965,8 @@ InodeIdentifier Ext2FileSystem::createInode(InodeIdentifier parentInode, const S
|
||||
// FIXME: Implement writing out indirect blocks!
|
||||
ASSERT(blocks.size() < EXT2_NDIR_BLOCKS);
|
||||
|
||||
printf("[XXX] writing %u blocks to i_block array\n", min((unsigned)EXT2_NDIR_BLOCKS, blocks.size()));
|
||||
for (unsigned i = 0; i < min((unsigned)EXT2_NDIR_BLOCKS, blocks.size()); ++i) {
|
||||
printf("[XXX] writing %u blocks to i_block array\n", min((size_t)EXT2_NDIR_BLOCKS, blocks.size()));
|
||||
for (unsigned i = 0; i < min((size_t)EXT2_NDIR_BLOCKS, blocks.size()); ++i) {
|
||||
e2inode->i_block[i] = blocks[i];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user