Voxia OS
v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
filesystem.h
Go to the documentation of this file.
1
#ifndef __VFS__FILESYSTEM_H__
2
#define __VFS__FILESYSTEM_H__
3
4
#include <
type.h
>
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
typedef
struct
vnode
vnode_t
;
11
typedef
struct
dentry
*
dentry_ptr
;
12
typedef
struct
cdev
*
cdev_ptr_t
;
13
14
typedef
struct
filesystem
filesystem_t
;
15
16
struct
fs_instance
;
17
typedef
struct
fs_operations
{
18
int (*
lookup
)(
struct
fs_instance
*
instance
,
char
*
path
,
dentry_ptr
parent
,
dentry_ptr
*out);
19
}
fs_operations_t
;
20
21
struct
fs_magic
{
22
const
uint8_t
magic
[32];
23
uint32_t
count
;
24
};
25
26
struct
fs_data
{
27
struct
fs_magic
magic
;
28
fs_operations_t
*
ops
;
29
};
30
31
struct
filesystem
{
32
char
name
[16];
33
struct
fs_data
data
;
34
struct
filesystem
*
next
;
35
}
__attribute__
((aligned(64)));
36
typedef
filesystem_t
*
filesystem_ptr_t
;
37
38
struct
fs_instance
{
39
dentry_ptr
block_dentry
;
40
cdev_ptr_t
cdev
;
41
filesystem_ptr_t
fs
;
42
};
43
44
int
create_filesystem
(
char
name
[16],
struct
fs_data
*
fs_data
);
45
filesystem_ptr_t
retrieve_filesystem
(
const
char
name
[16]);
46
filesystem_t
*
get_all_filesystem
();
47
filesystem_t
*
get_filesystem
(
const
char
name
[16]);
48
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#endif
// __VFS__FILESYSTEM_H__
instance
static AHCIModule instance
Definition
init.cpp:5
name
kstring name
Definition
dentry.h:5
dentry_ptr
struct dentry * dentry_ptr
Definition
dentry.h:20
parent
dentry_ptr parent
Definition
dentry.h:7
cdev_ptr_t
cdev_t * cdev_ptr_t
Definition
dev.h:70
get_all_filesystem
filesystem_t * get_all_filesystem()
create_filesystem
int create_filesystem(char name[16], struct fs_data *fs_data)
Definition
filesystem.c:7
dentry_ptr
struct dentry * dentry_ptr
Definition
filesystem.h:11
vnode_t
struct vnode vnode_t
Definition
filesystem.h:10
__attribute__
struct fs_instance __attribute__
retrieve_filesystem
filesystem_ptr_t retrieve_filesystem(const char name[16])
fs_operations_t
struct fs_operations fs_operations_t
get_filesystem
filesystem_t * get_filesystem(const char name[16])
filesystem_t
struct filesystem filesystem_t
Definition
filesystem.h:14
cdev_ptr_t
struct cdev * cdev_ptr_t
Definition
filesystem.h:12
filesystem_ptr_t
filesystem_t * filesystem_ptr_t
Definition
filesystem.h:36
cdev
Definition
dev.h:63
dentry
Definition
dentry.h:26
filesystem
Definition
filesystem.h:31
filesystem::data
struct fs_data data
Definition
filesystem.h:33
filesystem::name
char name[16]
Definition
filesystem.h:32
filesystem::next
struct filesystem * next
Definition
filesystem.h:34
fs_data
Definition
filesystem.h:26
fs_data::ops
fs_operations_t * ops
Definition
filesystem.h:28
fs_data::magic
struct fs_magic magic
Definition
filesystem.h:27
fs_instance
Definition
filesystem.h:38
fs_instance::block_dentry
dentry_ptr block_dentry
Definition
filesystem.h:39
fs_instance::cdev
cdev_ptr_t cdev
Definition
filesystem.h:40
fs_instance::fs
filesystem_ptr_t fs
Definition
filesystem.h:41
fs_magic
Definition
filesystem.h:21
fs_magic::count
uint32_t count
Definition
filesystem.h:23
fs_magic::magic
const uint8_t magic[32]
Definition
filesystem.h:22
fs_operations
Definition
filesystem.h:17
fs_operations::lookup
int(* lookup)(struct fs_instance *instance, char *path, dentry_ptr parent, dentry_ptr *out)
Definition
filesystem.h:18
vnode
Definition
vnode.h:59
type.h
uint32_t
unsigned int uint32_t
Definition
type.h:19
uint8_t
unsigned char uint8_t
Definition
type.h:7
path
kstring path
Definition
voxmo.h:7
include
vfs
filesystem.h
Generated on Sat May 30 2026 11:09:57 for Voxia OS by
1.13.2