From sanpei@sanpei.org Tue Aug 17 03:04:36 1999
Return-Path: <sanpei@sanpei.org>
Received: from titanium.yy.ics.keio.ac.jp (titanium.yy.ics.keio.ac.jp [131.113.47.73])
	by hub.freebsd.org (Postfix) with ESMTP id D70D3151FC
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Aug 1999 03:04:24 -0700 (PDT)
	(envelope-from sanpei@sanpei.org)
Received: from oxygen.yy.ics.keio.ac.jp (oxygen.yy.ics.keio.ac.jp [131.113.47.3])
	by titanium.yy.ics.keio.ac.jp (8.8.8+3.0Wbeta13/3.7W) with ESMTP id TAA12394;
	Tue, 17 Aug 1999 19:01:44 +0900 (JST)
Received: from lavender.sanpei.org (u4085.seaple.icc.ne.jp [210.170.12.85])
	by oxygen.yy.ics.keio.ac.jp (8.9.3+3.2W/3.7W) with ESMTP id TAA11629;
	Tue, 17 Aug 1999 19:01:43 +0900 (JST)
Received: (from sanpei@localhost)
	by lavender.sanpei.org (8.9.3/3.7W) id TAA05564;
	Tue, 17 Aug 1999 19:01:42 +0900 (JST)
Message-Id: <199908171001.TAA05564@lavender.sanpei.org>
Date: Tue, 17 Aug 1999 19:01:42 +0900 (JST)
From: sanpei@sanpei.org
Reply-To: sanpei@sanpei.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: [BTX] page in BTX has problem(quit key)
X-Send-Pr-Version: 3.2

>Number:         13196
>Category:       kern
>Synopsis:       [BTX] page in BTX has problem(quit key)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 17 03:10:01 PDT 1999
>Closed-Date:    Mon Dec 27 23:19:37 PST 1999
>Last-Modified:  Mon Dec 27 23:20:06 PST 1999
>Originator:     MIHIRA Yoshiro
>Release:        FreeBSD 4-current
>Organization:
Keio Univ. Japan.
>Environment:

	FreeBSD-current

>Description:

I installed FreeBSD-4.0-19990816-CURRENT. 

But BTX loader has problem.  When I show help message as below:

disk1s1a:> help set tunables
<<snip>>
--more--  <space> page down <enter> line down <q> quit 

If I enter <q>, but I can't quit help mode.
Another operations, <space> and <enter> are fine.

>How-To-Repeat:

>Fix:
	

>Release-Note:
>Audit-Trail:

From: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/13196: [BTX] page in BTX has problem(quit key)
Date: Tue, 30 Nov 1999 19:28:28 +0900

   I think this problem(can't quit help mode) was only appear with
 ``help set tunables'', because this help is larger than screen
 height.
 
   I created quick hack code. Your comments are welcome :-)
 
 --- sys/boot/common/commands.c.org	Tue Nov 30 18:37:05 1999
 +++ sys/boot/common/commands.c	Tue Nov 30 18:38:43 1999
 @@ -176,8 +176,10 @@
  		((subtopic != NULL) && (s != NULL) && !strcmp(subtopic, s))) {
  		/* exact match, print text */
  		while((fgetstr(buf, 80, hfd) >= 0) && (buf[0] != '#')) {
 -		    pager_output(buf);
 -		    pager_output("\n");
 +		    if (pager_output(buf))
 +			break;
 +		    if (pager_output("\n"))
 +			break;
  		}
  	    } else if ((subtopic == NULL) && (s != NULL)) {
  		/* topic match, list subtopics */
 
State-Changed-From-To: open->closed 
State-Changed-By: msmith 
State-Changed-When: Mon Dec 27 23:19:37 PST 1999 
State-Changed-Why:  
Suggested fix is good, committed. 
>Unformatted:
