aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc/fs.h
diff options
context:
space:
mode:
authorMarvin Borner2021-03-14 16:12:44 +0100
committerGitHub2021-03-14 16:12:44 +0100
commit268f3ccdb90ab4b9bd70ca176478797aae97ca05 (patch)
tree2dbc3e52d90dab4aae8021773f09b6b72a74b8cb /kernel/inc/fs.h
parent4309322f9d2b3e31421a3cc5399ab1f4368e0652 (diff)
parent6dec7db5158447b66f31a3f786ce2916cab83cec (diff)
Added memory management using paging
This was quite a roller-coaster and most things are slower now, but it works and is way more secure. I still need to implement things like shared memory for the WM/GUI system but other than that everything is supported.
Diffstat (limited to 'kernel/inc/fs.h')
-rw-r--r--kernel/inc/fs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/inc/fs.h b/kernel/inc/fs.h
index 33b1afb..cd97b99 100644
--- a/kernel/inc/fs.h
+++ b/kernel/inc/fs.h
@@ -20,6 +20,7 @@ struct device {
void *data;
s32 (*read)(void *buf, u32 offset, u32 count, struct device *dev);
s32 (*write)(void *buf, u32 offset, u32 count, struct device *dev);
+ s32 (*ioctl)(u32 request, void *arg1, void *arg2, void *arg3, struct device *dev);
u8 (*ready)(void);
};
@@ -40,6 +41,8 @@ struct vfs {
void *data;
s32 (*read)(const char *path, void *buf, u32 offset, u32 count, struct device *dev);
s32 (*write)(const char *path, void *buf, u32 offset, u32 count, struct device *dev);
+ s32 (*ioctl)(const char *path, u32 request, void *arg1, void *arg2, void *arg3,
+ struct device *dev);
s32 (*stat)(const char *path, struct stat *buf, struct device *dev);
s32 (*wait)(const char *path, u32 func_ptr, struct device *dev);
u8 (*perm)(const char *path, enum vfs_perm perm, struct device *dev);
@@ -60,6 +63,7 @@ struct device *vfs_find_dev(const char *path);
s32 vfs_read(const char *path, void *buf, u32 offset, u32 count);
s32 vfs_write(const char *path, void *buf, u32 offset, u32 count);
+s32 vfs_ioctl(const char *path, u32 request, void *arg1, void *arg2, void *arg3);
s32 vfs_stat(const char *path, struct stat *buf);
s32 vfs_wait(const char *path, u32 func_ptr);
s32 vfs_poll(const char **files);