summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/scvesactl.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/scvesactl.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/scvesactl.c')
-rw-r--r--sys/dev/syscons/scvesactl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c
index a39bf48..a556dc0 100644
--- a/sys/dev/syscons/scvesactl.c
+++ b/sys/dev/syscons/scvesactl.c
@@ -70,7 +70,7 @@ vesa_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *
case SW_TEXT_132x60:
if (!(scp->sc->adp->va_flags & V_ADP_MODECHANGE))
return ENODEV;
- return sc_set_text_mode(scp, tp, cmd & 0xff, 0, 0, 0);
+ return sc_set_text_mode(scp, tp, cmd & 0xff, 0, 0, 0, 0);
/* text modes */
case SW_VESA_C80x60:
@@ -81,7 +81,7 @@ vesa_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *
if (!(scp->sc->adp->va_flags & V_ADP_MODECHANGE))
return ENODEV;
mode = (cmd & 0xff) + M_VESA_BASE;
- return sc_set_text_mode(scp, tp, mode, 0, 0, 0);
+ return sc_set_text_mode(scp, tp, mode, 0, 0, 0, 0);
/* graphics modes */
case SW_VESA_32K_320: case SW_VESA_64K_320:
OpenPOWER on IntegriCloud