mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +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:
parent
cafb5b2ad6
commit
8293a0ff36
Notes:
sideshowbarker
2024-07-19 18:47:22 +09:00
Author: https://github.com/awesomekling
Commit: 8293a0ff36
5 changed files with 47 additions and 10 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue