1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 09:15:07 +00:00

Ext2FS: Implement writing into inodes with arbitrary offset and length.

Okay, this is pretty cool. :^) There are some issues and limitations for
sure but the basic functionality is there.
This commit is contained in:
Andreas Kling 2019-01-23 04:29:56 +01:00
parent 29dfb4ae13
commit 906685e238
8 changed files with 147 additions and 19 deletions

View file

@ -168,7 +168,7 @@ ssize_t FileDescriptor::write(Process& process, const byte* data, size_t size)
return m_device->write(process, data, size);
}
ASSERT(m_inode);
ssize_t nwritten = m_inode->write(ByteBuffer::wrap((byte*)data, size));
ssize_t nwritten = m_inode->write_bytes(m_current_offset, size, data, this);
m_current_offset += nwritten;
return nwritten;
}