From kbyanc@teapot.egroups.com  Sat Jun 10 20:20:01 2000
Return-Path: <kbyanc@teapot.egroups.com>
Received: from teapot.egroups.net (teapot.egroups.net [63.204.207.250])
	by hub.freebsd.org (Postfix) with SMTP id 453EE37B564
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Jun 2000 20:20:01 -0700 (PDT)
	(envelope-from kbyanc@teapot.egroups.com)
Received: (qmail 31856 invoked from network); 11 Jun 2000 03:20:08 -0000
Received: (QMFILT: 1.0); 11 Jun 2000 04:20:08 -0000
Received: from dhcp147.corp.onelist.com (HELO kbyanc.corp.ONElist.com) (192.168.10.147)
  by teapot.egroups.net with SMTP; 11 Jun 2000 03:20:08 -0000
Received: (from kbyanc@localhost)
	by kbyanc.corp.ONElist.com (8.9.3/8.9.3) id UAA91705;
	Sat, 10 Jun 2000 20:20:00 -0700 (PDT)
	(envelope-from kbyanc@teapot.egroups.com)
Message-Id: <200006110320.UAA91705@kbyanc.corp.ONElist.com>
Date: Sat, 10 Jun 2000 20:20:00 -0700 (PDT)
From: kbyanc@posi.net
Sender: kbyanc@teapot.egroups.com
Reply-To: kbyanc@posi.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: patch to set history buffer size via vidcontrol(1)
X-Send-Pr-Version: 3.2

>Number:         19190
>Category:       bin
>Synopsis:       patch to set history buffer size via vidcontrol(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 10 20:30:00 PDT 2000
>Closed-Date:    Fri Jun 16 00:16:48 PDT 2000
>Last-Modified:  Fri Jun 16 00:17:24 PDT 2000
>Originator:     Kelly Yancey
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
eGroups.com -- http://www.eGroups.com/
>Environment:

FreeBSD backroom.corp.ONElist.com 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Sat
Jun 10 12:08:26 PDT 2000
kbyanc@backroom.corp.ONElist.com:/usr/src/sys/compile/BACKROOM  i386

>Description:

	This patch teaches vidcontrol(1) about the CONS_HISTORY ioctl for
	syscons. It adds a -h parameter to allow the user to set the
	size of the history scrollback buffer in lines. It also updates
	the man page to briefly describe the new option.

	-Kelly
	 kbyanc@posi.net

>How-To-Repeat:
>Fix:

Index: vidcontrol.1
===================================================================
RCS file: /home/cvs/src/usr.sbin/vidcontrol/vidcontrol.1,v
retrieving revision 1.24
diff -u -r1.24 vidcontrol.1
--- vidcontrol.1	2000/03/01 14:07:45	1.24
+++ vidcontrol.1	2000/06/10 21:18:13
@@ -26,6 +26,7 @@
 .Op Fl c Ar appearance
 .Op Fl d
 .Op Fl f Ar size Ar file
+.Op Fl h Ar lines
 .Op Fl i Cm adapter | mode
 .Op Fl l Ar screen_map
 .Op Fl L
@@ -137,6 +138,9 @@
 Used together with the 
 .Xr moused 8
 daemon for text mode cut & paste functionality.
+.It Fl h Ar lines
+Set the history buffer to
+.Ar lines .
 .It Fl f Ar size Ar file
 Load font
 .Ar file
Index: vidcontrol.c
===================================================================
RCS file: /home/cvs/src/usr.sbin/vidcontrol/vidcontrol.c,v
retrieving revision 1.32
diff -u -r1.32 vidcontrol.c
--- vidcontrol.c	2000/01/12 12:30:33	1.32
+++ vidcontrol.c	2000/06/10 20:47:07
@@ -61,8 +61,8 @@
 	fprintf(stderr, "%s\n%s\n%s\n%s\n",
 "usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]",
 "                  [-i adapter | mode] [-L] [-M char] [-m on|off]",
-"                  [-f size file] [-s number] [-t N|off] [-x] [mode]",
-"                  [fgcol [bgcol]] [show]");
+"                  [-h lines] [-f size file] [-s number] [-t N|off] [-x]",
+"                  [mode] [fgcol [bgcol]] [show]");
 	exit(1);
 }
 
@@ -547,6 +547,20 @@
 }
 
 void
+set_history_size(char *arg)
+{
+	int l;
+
+	l = (int)strtol(arg, NULL, 0);
+	if (l < 0) {
+		warnx("argument to -h must be greater than 0");
+		return;
+	}
+	if (ioctl(0, CONS_HISTORY, &l) < 0)
+		warn("cannot set history size");
+}
+
+void
 test_frame()
 {
 	int i;
@@ -573,7 +587,7 @@
 	info.size = sizeof(info);
 	if (ioctl(0, CONS_GETINFO, &info) < 0)
 		err(1, "must be on a virtual console");
-	while((opt = getopt(argc, argv, "b:c:df:i:l:LM:m:r:s:t:x")) != -1)
+	while((opt = getopt(argc, argv, "b:c:df:h:i:l:LM:m:r:s:t:x")) != -1)
 		switch(opt) {
 			case 'b':
 				set_border_color(optarg);
@@ -587,6 +601,9 @@
 			case 'f':
 				load_font(optarg,
 					nextarg(argc, argv, &optind, 'f'));
+				break;
+			case 'h':
+				set_history_size(optarg);
 				break;
 			case 'i':
 				show_info(optarg);

>Release-Note:
>Audit-Trail:

From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To: kbyanc@posi.net
Cc: FreeBSD-gnats-submit@freebsd.org,
	yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject: Re: bin/19190: patch to set history buffer size via vidcontrol(1) 
Date: Sun, 11 Jun 2000 14:22:38 +0900

 >>Number:         19190
 >>Category:       bin
 >>Synopsis:       patch to set history buffer size via vidcontrol(1)
 [...]
 >>Originator:     Kelly Yancey
 >>Release:        FreeBSD 4.0-STABLE i386
 >>Organization:
 >eGroups.com -- http://www.eGroups.com/
 >>Environment:
 >
 >FreeBSD backroom.corp.ONElist.com 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Sat
 >Jun 10 12:08:26 PDT 2000
 >kbyanc@backroom.corp.ONElist.com:/usr/src/sys/compile/BACKROOM  i386
 >
 >>Description:
 >
 >	This patch teaches vidcontrol(1) about the CONS_HISTORY ioctl for
 >	syscons. It adds a -h parameter to allow the user to set the
 >	size of the history scrollback buffer in lines. It also updates
 >	the man page to briefly describe the new option.
 
 Um, this function is available in kbdcontrol(1)...
 
 Kazu
 

From: Kelly Yancey <kbyanc@posi.net>
To: kazutaka.yokota@nifty.com
Cc: FreeBSD-gnats-submit@freebsd.org,
	yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject: Re: bin/19190: patch to set history buffer size via vidcontrol(1) 
Date: Sun, 11 Jun 2000 10:21:43 -0700 (PDT)

 On Sun, 11 Jun 2000, Kazutaka YOKOTA wrote:
 
 > 
 > Um, this function is available in kbdcontrol(1)...
 > 
 > Kazu
 > 
 
   Hrm. Sorry, I didn't see it there. :(
 
   Kelly
 
 --
 Kelly Yancey  -  kbyanc@posi.net  -  Belmont, CA
 System Administrator, eGroups.com                  http://www.egroups.com/
 Maintainer, BSD Driver Database       http://www.posi.net/freebsd/drivers/
 Coordinator, Team FreeBSD        http://www.posi.net/freebsd/Team-FreeBSD/
 
 

From: Kelly Yancey <kbyanc@egroups.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/19190: patch to set history buffer size via vidcontrol(1)
Date: Thu, 15 Jun 2000 17:22:58 -0700 (PDT)

   Close me. The functionality is already in kbdcontrol.
 
   Kelly
 
 
State-Changed-From-To: open->closed 
State-Changed-By: alex 
State-Changed-When: Fri Jun 16 00:16:48 PDT 2000 
State-Changed-Why:  
Closed on originator's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19190 
>Unformatted:
