mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
Import the "gerbert" kernel I worked on earlier this year.
It's a lot crappier than I remembered it. It's gonna need a lot of work.
This commit is contained in:
parent
f608629704
commit
9396108034
55 changed files with 4600 additions and 0 deletions
35
Kernel/FileSystem.h
Normal file
35
Kernel/FileSystem.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include "types.h"
|
||||
#include "RefCounted.h"
|
||||
|
||||
namespace FileSystem {
|
||||
|
||||
void initialize();
|
||||
|
||||
class VirtualNode : public RefCounted<VirtualNode> {
|
||||
public:
|
||||
DWORD saneValue = 0x850209;
|
||||
virtual ~VirtualNode();
|
||||
|
||||
DWORD index() const { return m_index; }
|
||||
const String& path() const { return m_path; }
|
||||
|
||||
virtual size_t size() const = 0;
|
||||
virtual uid_t uid() const = 0;
|
||||
virtual gid_t gid() const = 0;
|
||||
virtual size_t mode() const = 0;
|
||||
|
||||
virtual size_t read(BYTE* outbuf, size_t start, size_t maxLength) = 0;
|
||||
|
||||
protected:
|
||||
VirtualNode(DWORD index, String&& path);
|
||||
|
||||
private:
|
||||
DWORD m_index { 0 };
|
||||
String m_path;
|
||||
};
|
||||
|
||||
RefPtr<VirtualNode> createVirtualNode(String&& path);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue