diff options
author | peter <peter@FreeBSD.org> | 2005-06-14 02:43:45 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2005-06-14 02:43:45 +0000 |
commit | 0ac96cc3449e6cc308ab0966f50b6bfc49316259 (patch) | |
tree | 0501b5433483e62d294b0347bcdfb85a3618a9b2 /sys/dev/syscons | |
parent | c1f0877e6fa535d784c31cf1740d786f0d2c1c68 (diff) | |
download | FreeBSD-src-0ac96cc3449e6cc308ab0966f50b6bfc49316259.zip FreeBSD-src-0ac96cc3449e6cc308ab0966f50b6bfc49316259.tar.gz |
Fix syscons on amd64. The SC_PIXEL_MODE commit from May 29th added a new
function pointer to the vga render dispatch table and initialized it with
vga_nop. The problem is that vga_nop() is a varargs function, and the
table declares a non-varargs function pointer. On amd64 (and I think ppc),
mixing varargs and non-varargs function pointers is fatal.
Change vga_nop() and gfb_nop() from varargs to non-varargs do-nothing
functions. This stops the stack corruption that only happened on amd64.
Approved by: re (scottl)
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/scgfbrndr.c | 4 | ||||
-rw-r--r-- | sys/dev/syscons/scvgarndr.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/syscons/scgfbrndr.c b/sys/dev/syscons/scgfbrndr.c index a7924bd..32a9166 100644 --- a/sys/dev/syscons/scgfbrndr.c +++ b/sys/dev/syscons/scgfbrndr.c @@ -62,7 +62,7 @@ static vr_draw_mouse_t gfb_mouse; #define gfb_mouse (vr_draw_mouse_t *)gfb_nop #endif -static void gfb_nop(scr_stat *scp, ...); +static void gfb_nop(scr_stat *scp); sc_rndr_sw_t txtrndrsw = { (vr_init_t *)gfb_nop, @@ -113,7 +113,7 @@ static u_char mouse_pointer[16] = { #endif static void -gfb_nop(scr_stat *scp, ...) +gfb_nop(scr_stat *scp) { } diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index 473f812..3c52a24 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -92,7 +92,7 @@ static vr_draw_mouse_t vga_pxlmouse_planar; static vr_draw_border_t vga_grborder; #endif -static void vga_nop(scr_stat *scp, ...); +static void vga_nop(scr_stat *scp); static sc_rndr_sw_t txtrndrsw = { (vr_init_t *)vga_nop, @@ -219,7 +219,7 @@ static uint16_t mouse_buf16[256]; #endif static void -vga_nop(scr_stat *scp, ...) +vga_nop(scr_stat *scp) { } |