2019-07-09 14:46:23 +02:00
|
|
|
#include <Kernel/FileSystem/File.h>
|
2019-06-07 09:36:51 +02:00
|
|
|
#include <Kernel/FileSystem/FileDescription.h>
|
2019-04-28 14:53:50 +02:00
|
|
|
|
|
|
|
File::File()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
File::~File()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-06-21 18:37:47 +02:00
|
|
|
KResultOr<NonnullRefPtr<FileDescription>> File::open(int options)
|
2019-04-28 14:53:50 +02:00
|
|
|
{
|
2020-01-04 12:29:33 +01:00
|
|
|
auto description = FileDescription::create(*this);
|
|
|
|
description->set_rw_mode(options);
|
|
|
|
return description;
|
2019-04-28 14:53:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void File::close()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-06-07 09:36:51 +02:00
|
|
|
int File::ioctl(FileDescription&, unsigned, unsigned)
|
2019-04-28 14:53:50 +02:00
|
|
|
{
|
|
|
|
return -ENOTTY;
|
|
|
|
}
|
|
|
|
|
2019-06-07 12:56:50 +02:00
|
|
|
KResultOr<Region*> File::mmap(Process&, FileDescription&, VirtualAddress, size_t, size_t, int)
|
2019-04-28 14:53:50 +02:00
|
|
|
{
|
|
|
|
return KResult(-ENODEV);
|
|
|
|
}
|