diff options
Diffstat (limited to 'src/loader/inc')
-rw-r--r-- | src/loader/inc/cfg.h | 16 | ||||
-rw-r--r-- | src/loader/inc/impl/all.h | 2 | ||||
-rw-r--r-- | src/loader/inc/log.h | 1 | ||||
-rw-r--r-- | src/loader/inc/sel.h | 8 |
4 files changed, 25 insertions, 2 deletions
diff --git a/src/loader/inc/cfg.h b/src/loader/inc/cfg.h index 1332fe1..27b3ca3 100644 --- a/src/loader/inc/cfg.h +++ b/src/loader/inc/cfg.h @@ -15,7 +15,19 @@ enum cfg_key { CFG_PATH, }; -const void *cfg_get(u8 index, enum cfg_key key); -void cfg_exec(void); +struct cfg_entry { + u8 exists : 1; + char name[64]; + char path[64]; + struct dev *dev; +}; + +struct cfg { + u32 timeout; + struct cfg_entry entry[16]; // Up to 16 different entries +}; + +void cfg_foreach(u8 (*cb)(struct cfg_entry *)); +void cfg_read(void); #endif diff --git a/src/loader/inc/impl/all.h b/src/loader/inc/impl/all.h index 366b1b3..1568322 100644 --- a/src/loader/inc/impl/all.h +++ b/src/loader/inc/impl/all.h @@ -11,9 +11,11 @@ enum impl_type { IMPL_MB2, }; +struct dev; struct impl { enum impl_type type; void *start; // Of header/entry + void (*load)(struct dev *, const char *); }; #include <dev.h> diff --git a/src/loader/inc/log.h b/src/loader/inc/log.h index 6fad366..c40ce50 100644 --- a/src/loader/inc/log.h +++ b/src/loader/inc/log.h @@ -9,5 +9,6 @@ void serial_print(const char *data); void vga_clear(void); void log(const char *format, ...); +void vga_log(const char *format, ...); #endif diff --git a/src/loader/inc/sel.h b/src/loader/inc/sel.h new file mode 100644 index 0000000..3885d34 --- /dev/null +++ b/src/loader/inc/sel.h @@ -0,0 +1,8 @@ +// MIT License, Copyright (c) 2021 Marvin Borner + +#ifndef SEL_H +#define SEL_H + +void sel_draw(void); + +#endif |