From 2727ed91ae39ca00a059079cb138962d3ce88828 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Sun, 21 May 2000 01:16:47 +0000 Subject: [PATCH] Prevent vidcontrol -i from crashing alphas Reported by: Christian Weisgerber Approved by: yokota@FreeBSD.ORG --- sys/dev/fb/fb.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index b95003eb2651..86ce59b96f38 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -719,7 +719,11 @@ fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) ((video_adapter_info_t *)arg)->va_mem_base = adp->va_mem_base; ((video_adapter_info_t *)arg)->va_mem_size = adp->va_mem_size; ((video_adapter_info_t *)arg)->va_window +#ifdef __i386__ = vtophys(adp->va_window); +#else + = adp->va_window; +#endif ((video_adapter_info_t *)arg)->va_window_size = adp->va_window_size; ((video_adapter_info_t *)arg)->va_window_gran @@ -727,7 +731,11 @@ fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) ((video_adapter_info_t *)arg)->va_window_orig = adp->va_window_orig; ((video_adapter_info_t *)arg)->va_unused0 +#ifdef __i386__ = (adp->va_buffer) ? vtophys(adp->va_buffer) : 0; +#else + = adp->va_buffer; +#endif ((video_adapter_info_t *)arg)->va_buffer_size = adp->va_buffer_size; ((video_adapter_info_t *)arg)->va_mode = adp->va_mode;