diff options
author | Marvin Borner | 2021-07-07 14:14:37 +0200 |
---|---|---|
committer | Marvin Borner | 2021-07-07 14:14:37 +0200 |
commit | 6355c3e08c9f4d3db122252abce5837c364d5b81 (patch) | |
tree | 8fffa4b79f6b5a2936766becb43282afbf0d675b /src/loader/impl/all.c | |
parent | 736d2b820d968915516d1662b84f9995d53895a3 (diff) |
ELF execution of mb1 implementation
Diffstat (limited to 'src/loader/impl/all.c')
-rw-r--r-- | src/loader/impl/all.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/loader/impl/all.c b/src/loader/impl/all.c index 1f19b1e..a5c93b1 100644 --- a/src/loader/impl/all.c +++ b/src/loader/impl/all.c @@ -2,6 +2,7 @@ #include <impl/all.h> #include <impl/mb1.h> +#include <pnc.h> u8 impl_detect(struct dev *dev, const char *path) { @@ -10,3 +11,20 @@ u8 impl_detect(struct dev *dev, const char *path) return 0; } + +void impl_exec(struct dev *dev, const char *path) +{ + assert(dev->type == DEV_DISK); + + switch (dev->p.disk.impl.type) { + case IMPL_MB1: + mb1_exec(dev, path); + break; + case IMPL_MB2: + case IMPL_NONE: + default: + panic("Invalid implementation\n"); + } + + panic("Couldn't execute implementation\n"); +} |