1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 09:55: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

@ -161,6 +161,12 @@ RetainPtr<FileDescriptor> VFS::create(const String& path, int& error, int option
{
(void) options;
error = -EWHYTHO;
if (!isSocket(mode) && !isFIFO(mode) && !isBlockDevice(mode) && !isCharacterDevice(mode)) {
// Turn it into a regular file. (This feels rather hackish.)
mode |= 0100000;
}
// FIXME: This won't work nicely across mount boundaries.
FileSystemPath p(path);
if (!p.is_valid()) {