From 6355c3e08c9f4d3db122252abce5837c364d5b81 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 7 Jul 2021 14:14:37 +0200 Subject: ELF execution of mb1 implementation --- src/loader/impl/all.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/loader/impl/all.c') 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 #include +#include 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"); +} -- cgit v1.2.3