diff --git a/ChangeLog b/ChangeLog index 3882b2628..703f840a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-01-08 Yoshinori K. Okuji + + * stage2/common.c [SUPPORT_DISKLESS] + (setup_diskless_environment): Removed. The feature is moved to + the preset menu. + * stage2/stage2.c [SUPPORT_DISKLESS] (preset_menu): Set to the + string "bootp\n". + [SUPPORT_DISKLESS] (preset_menu_offset): Defined, as if + PRESET_MENU_STRING is defined. + [SUPPORT_DISKLESS] (open_preset_menu): Likewise. + [SUPPORT_DISKLESS] (read_from_preset_menu): Likewise. + [SUPPORT_DISKLESS] (close_preset_menu): Likewise. + 2002-01-06 Yoshinori K. Okuji The preset menu has a priority over the configuration file. diff --git a/stage2/common.c b/stage2/common.c index 21369861c..3e63c171f 100644 --- a/stage2/common.c +++ b/stage2/common.c @@ -135,25 +135,6 @@ mmap_avail_at (unsigned long bottom) } #endif /* ! STAGE1_5 */ -#ifdef SUPPORT_DISKLESS -/* Set up the diskless environment so that GRUB can get a configuration - file from a network. */ -static int -setup_diskless_environment (void) -{ - /* For now, there is no difference between BOOTP and DHCP in GRUB. */ - if (! bootp ()) - { - grub_printf ("BOOTP/DHCP fails.\n"); - return 0; - } - - /* This will be erased soon, though... */ - print_network_configuration (); - return 1; -} -#endif /* SUPPORT_DISKLESS */ - /* This queries for BIOS information. */ void init_bios_info (void) @@ -333,12 +314,6 @@ init_bios_info (void) #endif /* STAGE1_5 */ -#ifdef SUPPORT_DISKLESS - /* If SUPPORT_DISKLESS is defined, initialize the network here. */ - if (! setup_diskless_environment ()) - return; -#endif - /* Set boot drive and partition. */ saved_drive = boot_drive; saved_partition = install_partition; diff --git a/stage2/stage2.c b/stage2/stage2.c index 1e6394a2b..e6f425923 100644 --- a/stage2/stage2.c +++ b/stage2/stage2.c @@ -21,9 +21,15 @@ grub_jmp_buf restart_env; -#ifdef PRESET_MENU_STRING +#if defined(PRESET_MENU_STRING) || defined(SUPPORT_DISKLESS) +# if defined(PRESET_MENU_STRING) static const char *preset_menu = PRESET_MENU_STRING; +# elif defined(SUPPORT_DISKLESS) +/* Execute the command "bootp" automatically. */ +static const char *preset_menu = "bootp\n"; +# endif /* SUPPORT_DISKLESS */ + static int preset_menu_offset; static int @@ -54,13 +60,13 @@ close_preset_menu (void) preset_menu = 0; } -#else /* ! PRESET_MENU_STRING */ +#else /* ! PRESET_MENU_STRING && ! SUPPORT_DISKLESS */ #define open_preset_menu() 0 #define read_from_preset_menu(buf, maxlen) 0 #define close_preset_menu() -#endif /* ! PRESET_MENU_STRING */ +#endif /* ! PRESET_MENU_STRING && ! SUPPORT_DISKLESS */ static char *