+2002-01-08 Yoshinori K. Okuji <okuji@gnu.org>
+
+ * grub/main.c (use_preset_menu): New variable.
+ (OPT_PRESET_MENU): New macro.
+ (longopts): Added an entry for "--preset-menu".
+ (usage): Added a description for "--preset-menu". Also, change
+ the first character of the description for "--device-map" to
+ lower case for consistency.
+ (main): Set USE_PRESET_MENU to 1 in the case of OPT_PRESET_MENU.
+ * stage2/shared.h (use_preset_menu): Declared.
+ * stage2/stage2.c [PRESET_MENU_STRING || SUPPORT_DISKLESS]
+ (open_preset_menu) [GRUB_UTIL]: If USE_PRESET_MENU is false,
+ return zero immediately.
+
2002-01-08 Yoshinori K. Okuji <okuji@gnu.org>
* stage2/common.c [SUPPORT_DISKLESS]
* The commands "hide" and "unhide" support logical partitions.
* The utility ``grub-install'' supports NetBSD.
* The network support is updated to Etherboot-5.0.5.
-* Important bugfixes are made for ReiserFS, APM, TFTP, etc.
+* The manner of handling the preset menu changes. In the previous
+ implementation, the preset menu is used only when opening the
+ configuration file failed. Now try to use the preset menu first. And,
+ if the configuration file is available, it is read after readoing the
+ preset menu. In this case, menu entries in the preset menu (if any)
+ are overrided by the configuration file.
+* Diskless support is a bit changed. In the previous, GRUB set up a
+ network automatically via a special function. In the current, the
+ function is gone and the preset menu feature is used (i.e. just
+ execute the command "bootp" as if you specified it in the preset
+ menu). This has no impact against most users, but you should take care
+ if using the preset menu for your own purpose, because GRUB doesn't
+ call "bootp" implicitly when the preset menu is used explicitly. In
+ this case, you would probably need to insert commands to initialize a
+ network into your preset menu.
+* Important bugfixes are made for ReiserFS, APM, TFTP, LBA, etc.
New in 0.90 - 2001-07-11:
* The command "setkey" resets key mappings, when no argument is
/* main.c - experimental GRUB stage2 that runs under Unix */
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
char *program_name = 0;
int use_config_file = 1;
+int use_preset_menu = 0;
int use_curses = 1;
int verbose = 0;
int read_only = 0;
static int default_install_partition;
static char *default_config_file;
-#define OPT_HELP -2
-#define OPT_VERSION -3
-#define OPT_HOLD -4
-#define OPT_CONFIG_FILE -5
-#define OPT_INSTALL_PARTITION -6
-#define OPT_BOOT_DRIVE -7
-#define OPT_NO_CONFIG_FILE -8
-#define OPT_NO_CURSES -9
-#define OPT_BATCH -10
-#define OPT_VERBOSE -11
-#define OPT_READ_ONLY -12
-#define OPT_PROBE_SECOND_FLOPPY -13
-#define OPT_NO_FLOPPY -14
-#define OPT_DEVICE_MAP -15
+#define OPT_HELP -2
+#define OPT_VERSION -3
+#define OPT_HOLD -4
+#define OPT_CONFIG_FILE -5
+#define OPT_INSTALL_PARTITION -6
+#define OPT_BOOT_DRIVE -7
+#define OPT_NO_CONFIG_FILE -8
+#define OPT_NO_CURSES -9
+#define OPT_BATCH -10
+#define OPT_VERBOSE -11
+#define OPT_READ_ONLY -12
+#define OPT_PROBE_SECOND_FLOPPY -13
+#define OPT_NO_FLOPPY -14
+#define OPT_DEVICE_MAP -15
+#define OPT_PRESET_MENU -16
#define OPTSTRING ""
static struct option longopts[] =
{"no-config-file", no_argument, 0, OPT_NO_CONFIG_FILE},
{"no-curses", no_argument, 0, OPT_NO_CURSES},
{"no-floppy", no_argument, 0, OPT_NO_FLOPPY},
+ {"preset-menu", no_argument, 0, OPT_PRESET_MENU},
{"probe-second-floppy", no_argument, 0, OPT_PROBE_SECOND_FLOPPY},
{"read-only", no_argument, 0, OPT_READ_ONLY},
{"verbose", no_argument, 0, OPT_VERBOSE},
--batch turn on batch mode for non-interactive use\n\
--boot-drive=DRIVE specify stage2 boot_drive [default=0x%x]\n\
--config-file=FILE specify stage2 config_file [default=%s]\n\
- --device-map=FILE Use the device map file FILE\n\
+ --device-map=FILE use the device map file FILE\n\
--help display this message and exit\n\
--hold wait until a debugger will attach\n\
--install-partition=PAR specify stage2 install_partition [default=0x%x]\n\
--no-config-file do not use the config file\n\
--no-curses do not use curses\n\
--no-floppy do not probe any floppy drive\n\
+ --preset-menu use the preset menu\n\
--probe-second-floppy probe the second floppy drive\n\
--read-only do not write anything to devices\n\
--verbose print verbose messages\n\
case OPT_DEVICE_MAP:
device_map_file = strdup (optarg);
break;
+
+ case OPT_PRESET_MENU:
+ use_preset_menu = 1;
+ break;
default:
usage (1);