diff options
author | msmith <msmith@FreeBSD.org> | 1997-06-22 13:51:04 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1997-06-22 13:51:04 +0000 |
commit | fca71c8053746768ec8fe17adbbe719edff334e8 (patch) | |
tree | 446f946bf0f3dbb647245231653d8180a5576f3f | |
parent | 0a4476a7fbb430c03c65895aaf4ff402ef81e0d6 (diff) | |
download | FreeBSD-src-fca71c8053746768ec8fe17adbbe719edff334e8.zip FreeBSD-src-fca71c8053746768ec8fe17adbbe719edff334e8.tar.gz |
From the submitted patch :
The kernel with USERCONFIG_BOOT and VISUAL_USERCONFIG option presents
the user the kernel configuration menu upon boot.
The user can navigate the menu with cursor keys. I think it would be
nice if the user can navigate and select a menu item with regular keys
as well, so that the user who is using a serial console which is not
so capable of esc sequences still can choose a menu item.
With the following patch we can select an item by typing an item
number, 1, 2, or 3, or mnemonic `s' to skip UserConfig, 'v' to enter
the visual mode, and `c' to start the CLI mode. `p', `u', `n', and `d'
will move cursor up and down.
Submitted by: yokota
-rw-r--r-- | sys/i386/i386/userconfig.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c index 96a54c8..feb366c 100644 --- a/sys/i386/i386/userconfig.c +++ b/sys/i386/i386/userconfig.c @@ -46,7 +46,7 @@ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** - ** $Id: userconfig.c,v 1.84 1997/03/11 07:11:46 msmith Exp $ + ** $Id: userconfig.c,v 1.85 1997/03/13 18:03:47 joerg Exp $ **/ /** @@ -2358,7 +2358,7 @@ visuserconfig(void) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: userconfig.c,v 1.84 1997/03/11 07:11:46 msmith Exp $ + * $Id: userconfig.c,v 1.85 1997/03/13 18:03:47 joerg Exp $ */ #include "scbus.h" @@ -2835,6 +2835,38 @@ introfunc(CmdParm *parms) clear(); return 1; /* user requests exit */ + case '1': /* select an item */ + case 'S': + case 's': + curr_item = 0; + break; + case '2': + case 'V': + case 'v': + curr_item = 1; + break; + case '3': + case 'C': + case 'c': + curr_item = 2; + break; + + case 'U': /* up */ + case 'u': + case 'P': + case 'p': + if (curr_item > 0) + --curr_item; + break; + + case 'D': /* down */ + case 'd': + case 'N': + case 'n': + if (curr_item < 2) + ++curr_item; + break; + case '\r': case '\n': clear(); |