mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 10:10:29 +00:00
Change the command-line options in /sbin/grub, and update the manual.
This commit is contained in:
1 parent
adbb228ab7
commit
b06ee733ef
3 files changed
+80
-14
No files matched your search
+14
-13
@@ -44,8 +44,8 @@ static char *default_config_file;
|
||||
#define OPT_CONFIG_FILE -5
|
||||
#define OPT_INSTALL_PARTITION -6
|
||||
#define OPT_BOOT_DRIVE -7
|
||||
#define OPT_DISABLE_CONFIG_FILE -8
|
||||
#define OPT_DISABLE_CURSES -9
|
||||
#define OPT_NO_CONFIG_FILE -8
|
||||
#define OPT_NO_CURSES -9
|
||||
#define OPT_BATCH -10
|
||||
#define OPTSTRING ""
|
||||
|
||||
@@ -57,8 +57,8 @@ static struct option longopts[] =
|
||||
{"config-file", required_argument, 0, OPT_CONFIG_FILE},
|
||||
{"install-partition", required_argument, 0, OPT_INSTALL_PARTITION},
|
||||
{"boot-drive", required_argument, 0, OPT_BOOT_DRIVE},
|
||||
{"disable-config-file", no_argument, 0, OPT_DISABLE_CONFIG_FILE},
|
||||
{"disable-curses", no_argument, 0, OPT_DISABLE_CURSES},
|
||||
{"no-config-file", no_argument, 0, OPT_NO_CONFIG_FILE},
|
||||
{"no-curses", no_argument, 0, OPT_NO_CURSES},
|
||||
{"batch", no_argument, 0, OPT_BATCH},
|
||||
{0},
|
||||
};
|
||||
@@ -68,25 +68,26 @@ static void
|
||||
usage (int status)
|
||||
{
|
||||
if (status)
|
||||
fprintf (stderr, "Try ``%s --help'' for more information.\n",
|
||||
program_name);
|
||||
fprintf (stderr, "Try ``grub --help'' for more information.\n");
|
||||
else
|
||||
printf ("\
|
||||
Usage: %s [OPTION]...\n\
|
||||
Usage: grub [OPTION]...\n\
|
||||
\n\
|
||||
Enter the GRand Unified Bootloader command shell.\n\
|
||||
\n\
|
||||
--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\
|
||||
--disable-config-file disable to use the config file\n\
|
||||
--disable-curses disable to use curses\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\
|
||||
--version print version information and exit\n\
|
||||
\n\
|
||||
Report bugs to bug-grub@gnu.org\n\
|
||||
",
|
||||
program_name, default_boot_drive, default_config_file,
|
||||
default_boot_drive, default_config_file,
|
||||
default_install_partition);
|
||||
|
||||
exit (status);
|
||||
@@ -152,16 +153,16 @@ main (int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
case OPT_DISABLE_CONFIG_FILE:
|
||||
case OPT_NO_CONFIG_FILE:
|
||||
use_config_file = 0;
|
||||
break;
|
||||
|
||||
case OPT_DISABLE_CURSES:
|
||||
case OPT_NO_CURSES:
|
||||
use_curses = 0;
|
||||
break;
|
||||
|
||||
case OPT_BATCH:
|
||||
/* This is the same as "--disable-config-file --disable-curses". */
|
||||
/* This is the same as "--no-config-file --no-curses". */
|
||||
use_config_file = 0;
|
||||
use_curses = 0;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user