start: tidy up the ifdefs for the boot parser
authorAlan Cox <alan@linux.intel.com>
Fri, 13 Feb 2015 23:15:06 +0000 (23:15 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 13 Feb 2015 23:15:06 +0000 (23:15 +0000)
Kernel/include/kernel.h
Kernel/start.c

index 8f764c2..d83faff 100644 (file)
@@ -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);
index 7709b9f..26a45d2 100644 (file)
@@ -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)
 {