From c34bb048183c6fb845e948dae03757acba6ed2b0 Mon Sep 17 00:00:00 2001 From: okuji Date: Fri, 8 Feb 2002 01:28:39 +0000 Subject: [PATCH] 2002-02-08 Yoshinori K. Okuji * grub/main.c (OPT_NO_PAGER): New macro. (longopts): Added an entry for "--no-pager". (usage): Added a description about "--no-pager". (main): In case of OPT_NO_PAGER, set USE_PAGER to zero. The same thing is done with OPT_BATCH, because the pager is just harmful in batch mode. --- ChangeLog | 9 +++++++++ docs/grub.8 | 3 +++ grub/main.c | 12 ++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6c0270e4..e42573e55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-02-08 Yoshinori K. Okuji + + * grub/main.c (OPT_NO_PAGER): New macro. + (longopts): Added an entry for "--no-pager". + (usage): Added a description about "--no-pager". + (main): In case of OPT_NO_PAGER, set USE_PAGER to zero. The same + thing is done with OPT_BATCH, because the pager is just harmful + in batch mode. + 2002-02-08 Yoshinori K. Okuji * stage2/builtins.c (help_func): Show all the commands runnable diff --git a/docs/grub.8 b/docs/grub.8 index c5be5fc1f..8101f7206 100644 --- a/docs/grub.8 +++ b/docs/grub.8 @@ -38,6 +38,9 @@ do not use curses \fB\-\-no\-floppy\fR do not probe any floppy drive .TP +\fB\-\-no\-pager\fR +do not use internal pager +.TP \fB\-\-preset\-menu\fR use the preset menu .TP diff --git a/grub/main.c b/grub/main.c index 009df8721..7b3fa8bc0 100644 --- a/grub/main.c +++ b/grub/main.c @@ -1,7 +1,7 @@ /* main.c - experimental GRUB stage2 that runs under Unix */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + * Copyright (C) 1999,2000,2001,2002 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 @@ -63,6 +63,7 @@ static char *default_config_file; #define OPT_NO_FLOPPY -14 #define OPT_DEVICE_MAP -15 #define OPT_PRESET_MENU -16 +#define OPT_NO_PAGER -17 #define OPTSTRING "" static struct option longopts[] = @@ -77,6 +78,7 @@ 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}, + {"no-pager", no_argument, 0, OPT_NO_PAGER}, {"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}, @@ -107,6 +109,7 @@ Enter the GRand Unified Bootloader command shell.\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\ + --no-pager do not use internal pager\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\ @@ -198,10 +201,15 @@ main (int argc, char **argv) use_curses = 0; break; + case OPT_NO_PAGER: + use_pager = 0; + break; + case OPT_BATCH: - /* This is the same as "--no-config-file --no-curses". */ + /* This is the same as "--no-config-file --no-curses --no-pager". */ use_config_file = 0; use_curses = 0; + use_pager = 0; break; case OPT_READ_ONLY: