ladybird/Kernel/File.cpp
Andreas Kling 8cbb7f101f Kernel: Have File virtuals take a FileDescriptor& rather than a Process&.
This will allow us to implement different behaviors depending on the role
of the descriptor a File is being accessed through.
2019-04-29 13:58:40 +02:00

32 lines
449 B
C++

#include <Kernel/File.h>
#include <Kernel/FileSystem/FileDescriptor.h>
File::File()
{
}
File::~File()
{
}
KResultOr<Retained<FileDescriptor>> File::open(int options)
{
UNUSED_PARAM(options);
return FileDescriptor::create(this);
}
void File::close()
{
}
int File::ioctl(FileDescriptor&, unsigned, unsigned)
{
return -ENOTTY;
}
KResultOr<Region*> File::mmap(Process&, LinearAddress, size_t, size_t)
{
return KResult(-ENODEV);
}