From nivit@libero.it  Wed Jan 22 13:51:10 2003
Return-Path: <nivit@libero.it>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BAEA437B405
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Jan 2003 13:51:10 -0800 (PST)
Received: from smtp1.libero.it (smtp1.libero.it [193.70.192.51])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9E55943F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Jan 2003 13:51:06 -0800 (PST)
	(envelope-from nivit@libero.it)
Received: from coryphantha (151.29.216.213) by smtp1.libero.it (6.7.015)
        id 3E0C717100A57682 for FreeBSD-gnats-submit@freebsd.org; Wed, 22 Jan 2003 22:51:04 +0100
Received: (qmail 387 invoked by uid 1002); 22 Jan 2003 09:44:43 -0000
Message-Id: <20030122094443.386.qmail@Coryphantha.DOMO.SVA>
Date: 22 Jan 2003 09:44:43 -0000
From: nivit@libero.it (Nicola Vitale)
Reply-To: Nicola Vitale <nivit@libero.it>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Nicola Vitale <nivit@libero.it>
Subject: [PATCH], pcvt(4), COLOR_KERNEL_FG, 2nd character set, kernel messages
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         47376
>Category:       i386
>Synopsis:       [pcvt] [PATCH], pcvt(4), COLOR_KERNEL_FG, 2nd character set, kernel messages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 22 14:00:09 PST 2003
>Closed-Date:    Mon Sep 11 12:20:11 GMT 2006
>Last-Modified:  Mon Sep 11 12:20:11 GMT 2006
>Originator:     Nicola Vitale
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD Coryphantha.DOMO.SVA 4.7-STABLE FreeBSD 4.7-STABLE #238: Tue Jan 21 22:28:41 CET 2003 root@Coryphantha.DOMO.SVA:/usr/obj/usr/src/sys/Coryphantha i386


	vt0 on isa0
	vt0: generic, 80 col, color, 12 scr, mf2-kbd, [R3.20-b24]
	vt0: driver is using old-style compatability shims

>Description:
	
	If you configure the pcvt driver with the option
	
		COLOR_KERNEL_FG=FG_YELLOW

	(or another color with value greater than 7, see
	 src/sys/i386/include/pc/display.h),

	and load a second character set, then the kernel messages
	become illegible in console.
	
>How-To-Repeat:

	Install a kernel with the pcvt driver and with the options

		COLOR_KERNEL_FG=FG_YELLOW
		COLOR_KERNEL_BG=BG_BLACK

	Then from a terminal:

		loadfont -c0 -f /usr/share/misc/pcvtfonts/vt220l.816
		loadfont -c1 -f /usr/share/misc/pcvtfonts/vt220h.816
		scon -s 25

		shutdown -h now

>Fix:

--- pcvt_out.c.diff begins here ---
--- src/sys/i386/isa/pcvt/pcvt_out.c	Thu Dec 30 17:17:10 1999
+++ src/sys/i386/isa/pcvt/pcvt_out.c.new	Tue Jan 21 21:50:50 2003
@@ -1008,7 +1008,8 @@
 
 	if(color)
 	{
-		kern_attr = (COLOR_KERNEL_FG | COLOR_KERNEL_BG) << 8;
+		/* bit 3 is for a 2nd character set */ 
+		kern_attr = ((COLOR_KERNEL_FG & ~(1 << 3)) | COLOR_KERNEL_BG) << 8;
 		user_attr = sgr_tab_color[0] << 8;
 	}
 	else
--- pcvt_out.c.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->hm 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sun Jul 13 00:37:40 PDT 2003 
Responsible-Changed-Why:  
hm appears to be the pcvt maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47376 
Responsible-Changed-From-To: hm->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 13 05:37:36 GMT 2004 
Responsible-Changed-Why:  
Reassign to pool; maintainer is away from FreeBSD work due to press 
of other issues these days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47376 
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 12:20:09 UTC 2006 
State-Changed-Why:  
this mail will also bounce, same bumitter as 47223 

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