summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/syscons.c
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2005-08-30 18:58:17 +0000
committerrodrigc <rodrigc@FreeBSD.org>2005-08-30 18:58:17 +0000
commit202872e9e687e8cc11a6302ad1aa8d0781556ccd (patch)
tree7796a5bca15fb24807fcf1b8d8fa3f0b68805a4b /sys/dev/syscons/syscons.c
parent40d25976f11fbf40e8b37a57763c0e2a223bc034 (diff)
downloadFreeBSD-src-202872e9e687e8cc11a6302ad1aa8d0781556ccd.zip
FreeBSD-src-202872e9e687e8cc11a6302ad1aa8d0781556ccd.tar.gz
Prevent division by zero errors in sc_mouse_move()
by explicitly setting sc->font_width, in the same places where sc->font_size is set, instead of relying on the default initialized value of 0 for sc->font_width. PR: kern/84836 Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru> MFC after: 2 days
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r--sys/dev/syscons/syscons.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 8daca00..5c8b843 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -358,7 +358,7 @@ sc_attach_unit(int unit, int flags)
splash_term(sc->adp);
#endif
sc_set_graphics_mode(scp, NULL, M_VESA_800x600);
- sc_set_pixel_mode(scp, NULL, COL, ROW, 16);
+ sc_set_pixel_mode(scp, NULL, COL, ROW, 16, 8);
sc->initial_mode = M_VESA_800x600;
#ifdef DEV_SPLASH
/* put up the splash again! */
@@ -510,7 +510,7 @@ scopen(struct cdev *dev, int flag, int mode, struct thread *td)
if (scp == NULL) {
scp = SC_STAT(dev) = alloc_scp(sc, SC_VTY(dev));
if (ISGRAPHSC(scp))
- sc_set_pixel_mode(scp, NULL, COL, ROW, 16);
+ sc_set_pixel_mode(scp, NULL, COL, ROW, 16, 8);
}
if (!tp->t_winsize.ws_col && !tp->t_winsize.ws_row) {
tp->t_winsize.ws_col = scp->xsize;
OpenPOWER on IntegriCloud