From: Alan Cox Date: Fri, 13 Feb 2015 23:15:06 +0000 (+0000) Subject: start: tidy up the ifdefs for the boot parser X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=05f5dec589e76c7df5be89ab577fb7044f091e78;p=FUZIX.git start: tidy up the ifdefs for the boot parser --- diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index 8f764c27..d83faff2 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -581,6 +581,10 @@ extern void trap_monitor(void); extern void idump(void); /* start.c */ +#ifndef CONFIG_BOOTDEVICE +#define default_bootdevice bootdevice +#endif +extern uint16_t default_bootdevice(unsigned char *s); /* platform/device.c */ extern bool validdev(uint16_t dev); diff --git a/Kernel/start.c b/Kernel/start.c index 7709b9f4..26a45d2c 100644 --- a/Kernel/start.c +++ b/Kernel/start.c @@ -83,12 +83,9 @@ void create_init(void) udata.u_argn2 = (arg_t)(PROGLOAD + 0xb); /* Environment (none) */ } -#ifdef CONFIG_BOOTDEVICE -extern uint16_t bootdevice(unsigned char *s); -#else /* to sensibly parse device names this needs to be platform-specific, this default version parses minor numbers only */ -uint16_t bootdevice(unsigned char *s) +uint16_t default_bootdevice(unsigned char *s) { unsigned int r = 0; @@ -106,7 +103,6 @@ uint16_t bootdevice(unsigned char *s) s++; } } -#endif uint16_t get_root_dev(void) {