Luna/kernel/include/fs/VFS.h
apio 2be70d0bc1 VFS: Use 64-bit numbers in read()
There is no need for any kind of 32-bit compatibility.
2022-10-09 21:30:38 +02:00

29 lines
560 B
C++

#pragma once
#include <stddef.h>
#include <stdint.h>
typedef long ssize_t;
namespace VFS
{
struct Node;
typedef ssize_t (*node_read)(Node*, size_t, size_t, char*);
typedef Node* (*node_finddir)(Node*, const char*);
struct Node
{
char name[64];
uint64_t inode;
uint64_t length;
node_read read_func;
node_finddir find_func;
};
ssize_t read(Node* node, size_t offset, size_t length, char* buffer);
Node* open(const char* filename);
void mount_root(Node* root);
Node* root();
}