tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: amd64 9.1, pre-wscons text colours?



>> What controls the colours used for console text output before wscons
>> takes over?  [...]

>> So there's clearly something I don't understand going on.  What?

> That's all wscons; drmkms taking over isn't the same step as wscons
> taking over.

Okay, that's _one_ thing I didn't understand.... :-)

> But anyway: my guess is that you can't use the bright colors.  I
> vaguely recall some issue with that long ago...

I just trawled for WSCOL_ in the kernel source tree.  The only thing I
see that could be responsible is this, in dev/rcons/rcons_subr.c:

/* Set ANSI colors */
void
rcons_setcolor(struct rconsole *rc, int fg, int bg)
{
	int flg;

	if (fg > WSCOL_WHITE || fg < 0)
		return;

	if (bg > WSCOL_WHITE || bg < 0)
		return;

and the WSCOL_LIGHT_ colours are 8 higher than the non-LIGHT versions.
So if rcons is in use, this explains it.  (I'm not sure it is, but the
symptoms match, and I don't, offhand, see anywhere else that could be
responsible.  But I'm not at all certain I haven't missed something.)

Of course, the question now becomes _why_ that code is there.
According to cvsweb, it appeared in rev 1.3, on 1999-04-13, without any
indication what the purpose of it is; the commit message reads

| Many enchancements to rcons to support ANSI color and all attributes
| properly. All output now performed using a 'struct wsdisplay_emulops'.

(There are numerous other messages talking about "ANSI color", but I
_think_ it's actually ISO color; the SGR sequence is ANSI, but as I
understand it the colour-specifying arguments for it come from ISO
6429, not ANSI.  I've never found an authoritative source to say
whether this is a misunderstanding or not....)

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index