Commit 38e4e1df authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fbcon font cloning fix

From: Petr Baudis <pasky@ucw.cz>

This patch fixes a bug which I hit when migrating from 2.4.  Basically,
when I do setfont during the system boot, the then-spawned ttys do not
retain the new font but fall back to the default one.

I've tracked that down to a clearly bogus test in fbcon_set_display(),
because vc->vc_font.width is not set at that time yet (no font has been
loaded for the new vc).  But even if it would (or this was meant to test
against tmp->vc_font.width), it would mean only *HUGE* fonts would be
retained.  And even if there were *two* bugs there and it was supposed to
be less-than there, I couldn't make a sense of the test.
parent 2d56ea2d
......@@ -662,7 +662,6 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
struct display *q = &fb_display[i];
struct vc_data *tmp = vc_cons[i].d;
if (vc->vc_font.width > 32) {
/* If we are not the first console on this
fb, copy the font from that console */
vc->vc_font.width = tmp->vc_font.width;
......@@ -675,7 +674,6 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
}
con_copy_unimap(vc->vc_num, i);
}
}
if (!p->fontdata) {
if (!p->fontname[0] || !(font = find_font(p->fontname)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment