ladybird/Kernel/File.cpp
Andreas Kling 66c1a9be3b Kernel: Pass 'prot' argument to File::mmap() and act on it.
Nothing crazy, this just means that PROT_READ allocates readable regions,
and that PROT_WRITE allocates writable ones.
2019-05-30 12:38:35 +02:00

31 lines
454 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, int)
{
return KResult(-ENODEV);
}