Skip site navigation (1)Skip section navigation (2)
Date:      22 Jan 2003 09:44:43 -0000
From:      nivit@libero.it (Nicola Vitale)
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Nicola Vitale <nivit@libero.it>
Subject:   i386/47376: [PATCH], pcvt(4), COLOR_KERNEL_FG, 2nd character set, kernel messages
Message-ID:  <20030122094443.386.qmail@Coryphantha.DOMO.SVA>

next in thread | raw e-mail | index | archive | help

>Number:         47376
>Category:       i386
>Synopsis:       [PATCH], pcvt(4), COLOR_KERNEL_FG, 2nd character set, kernel messages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 22 14:00:09 PST 2003
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030122094443.386.qmail>