From 05f5dec589e76c7df5be89ab577fb7044f091e78 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 13 Feb 2015 23:15:06 +0000 Subject: [PATCH] start: tidy up the ifdefs for the boot parser --- Kernel/include/kernel.h | 4 ++++ Kernel/start.c | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) 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) { -- 2.34.1