mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:35:08 +00:00
More work towards getting bash to build.
Implemented some syscalls: dup(), dup2(), getdtablesize(). FileHandle is now a retainable, since that's needed for dup()'ed fd's. I didn't really test any of this beyond a basic smoke check.
This commit is contained in:
parent
82f84bab11
commit
9f2b9c82bf
17 changed files with 114 additions and 23 deletions
|
@ -398,15 +398,15 @@ bool VirtualFileSystem::touch(const String& path)
|
|||
return inode.fileSystem()->setModificationTime(inode, ktime(nullptr));
|
||||
}
|
||||
|
||||
OwnPtr<FileHandle> VirtualFileSystem::open(CharacterDevice& device, int options)
|
||||
RetainPtr<FileHandle> VirtualFileSystem::open(CharacterDevice& device, int options)
|
||||
{
|
||||
auto vnode = getOrCreateNode(device);
|
||||
if (!vnode)
|
||||
return nullptr;
|
||||
return make<FileHandle>(move(vnode));
|
||||
return FileHandle::create(move(vnode));
|
||||
}
|
||||
|
||||
OwnPtr<FileHandle> VirtualFileSystem::open(const String& path, int& error, int options, InodeIdentifier base)
|
||||
RetainPtr<FileHandle> VirtualFileSystem::open(const String& path, int& error, int options, InodeIdentifier base)
|
||||
{
|
||||
auto inode = resolvePath(path, error, base, options);
|
||||
if (!inode.isValid())
|
||||
|
@ -414,10 +414,10 @@ OwnPtr<FileHandle> VirtualFileSystem::open(const String& path, int& error, int o
|
|||
auto vnode = getOrCreateNode(inode);
|
||||
if (!vnode)
|
||||
return nullptr;
|
||||
return make<FileHandle>(move(vnode));
|
||||
return FileHandle::create(move(vnode));
|
||||
}
|
||||
|
||||
OwnPtr<FileHandle> VirtualFileSystem::create(const String& path, InodeIdentifier base)
|
||||
RetainPtr<FileHandle> VirtualFileSystem::create(const String& path, InodeIdentifier base)
|
||||
{
|
||||
// FIXME: Do the real thing, not just this fake thing!
|
||||
(void) path;
|
||||
|
@ -425,7 +425,7 @@ OwnPtr<FileHandle> VirtualFileSystem::create(const String& path, InodeIdentifier
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
OwnPtr<FileHandle> VirtualFileSystem::mkdir(const String& path, InodeIdentifier base)
|
||||
RetainPtr<FileHandle> VirtualFileSystem::mkdir(const String& path, InodeIdentifier base)
|
||||
{
|
||||
// FIXME: Do the real thing, not just this fake thing!
|
||||
(void) path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue