aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-12-11 20:22:15 +0100
committerMarvin Borner2020-12-11 20:22:15 +0100
commitd4c618d81316614942a8248f34e18d105ea31201 (patch)
treead606d663c4e4a4c70a44525c6b2c609c4e4aa68 /kernel/inc
parente15742fac894e2d5be3d0d44411a5cd24f794e18 (diff)
Some FS stuff
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/fs.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/kernel/inc/fs.h b/kernel/inc/fs.h
index 7336a72..3cc39e6 100644
--- a/kernel/inc/fs.h
+++ b/kernel/inc/fs.h
@@ -6,6 +6,34 @@
#include <def.h>
/**
+ * Device
+ */
+
+struct device {
+ u32 id;
+ const char *name;
+ int type; // TODO: Block, char device
+ struct vfs *vfs;
+ u8 (*read)(u8 *buf, u32 offset, u32 count, struct device *dev);
+ u8 (*write)(u8 *buf, u32 offset, u32 count, struct device *dev);
+};
+
+/**
+ * VFS
+ */
+
+struct vfs {
+ const char *name;
+ u8 (*read)(char *, char *, struct device *, void *);
+ u8 (*mount)(struct device *, void *);
+};
+
+struct mount_info {
+ const char *path;
+ struct device *dev;
+};
+
+/**
* EXT2
*/
@@ -99,29 +127,4 @@ struct file {
void *file_read(char *path);
u32 file_stat(char *path);
-/**
- * VFS
- */
-
-struct device {
- u32 id;
- const char *name;
- int type; // TODO: Block, char device
- struct vfs *vfs;
- u8 (*read)(u8 *buf, u32 offset, u32 count, struct device *dev);
- u8 (*write)(u8 *buf, u32 offset, u32 count, struct device *dev);
-};
-
-struct vfs {
- const char *name;
- u8 (*probe)(struct device *);
- u8 (*read)(char *, char *, struct device *, void *);
- u8 (*mount)(struct device *, void *);
-};
-
-struct mount_info {
- const char *path;
- struct device *dev;
-};
-
#endif