diff options
Diffstat (limited to 'src/loader/inc/dev.h')
-rw-r--r-- | src/loader/inc/dev.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/loader/inc/dev.h b/src/loader/inc/dev.h index 930b35c..7ea3147 100644 --- a/src/loader/inc/dev.h +++ b/src/loader/inc/dev.h @@ -4,6 +4,7 @@ #define DEV_H #include <def.h> +#include <fs.h> enum dev_type { DEV_DISK, @@ -18,13 +19,16 @@ struct dev { s32 (*read)(void *, u32, u32, struct dev *); s32 (*write)(const void *, u32, u32, struct dev *); + struct fs fs; + u32 data; // Optional (device-specific) data/information u8 exists : 1; }; -u32 dev_register(enum dev_type type, char *name, u32 data, - s32 (*read)(void *, u32, u32, struct dev *), - s32 (*write)(const void *, u32, u32, struct dev *)); +struct dev *dev_get(u8 id); +u8 dev_register(enum dev_type type, char *name, u32 data, + s32 (*read)(void *, u32, u32, struct dev *), + s32 (*write)(const void *, u32, u32, struct dev *)); void dev_print(void); #endif |