From eac47d67be0b551ce16e2813908af8c097fdd0ef Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Thu, 2 Aug 2001 11:26:30 +0000 Subject: [PATCH] Add FBIO_BLANK ioctl support. Return ENODEV for yet-to-be- supported ioctls for now. --- sys/dev/fb/fb.c | 9 +++++++++ sys/dev/syscons/scvidctl.c | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index 056988dc02b5..75d9b44bd81e 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -799,12 +799,18 @@ fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) *(u_int *)arg = adp->va_line_width; break; + case FBIO_BLANK: /* blank display */ + error = (*vidsw[adp->va_index]->blank_display)(adp, *(int *)arg); + break; + case FBIO_GETPALETTE: /* get color palette */ case FBIO_SETPALETTE: /* set color palette */ /* XXX */ case FBIOPUTCMAP: case FBIOGETCMAP: + case FBIOPUTCMAPI: + case FBIOGETCMAPI: /* XXX */ case FBIO_SETWINORG: /* set frame buffer window origin */ @@ -815,11 +821,14 @@ fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) case FBIOGATTR: case FBIOSVIDEO: case FBIOGVIDEO: + case FBIOVERTICAL: case FBIOSCURSOR: case FBIOGCURSOR: case FBIOSCURPOS: case FBIOGCURPOS: case FBIOGCURMAX: + case FBIOMONINFO: + case FBIOGXINFO: default: error = ENODEV; diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c index 72dc7db13045..b75e545879b3 100644 --- a/sys/dev/syscons/scvidctl.c +++ b/sys/dev/syscons/scvidctl.c @@ -581,6 +581,11 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p) return ENODEV; /* XXX */ return fb_ioctl(adp, cmd, data); + case FBIO_BLANK: + if (scp != scp->sc->cur_scp) + return ENODEV; /* XXX */ + return fb_ioctl(adp, cmd, data); + #ifndef SC_NO_MODE_CHANGE /* generic text modes */ case SW_TEXT_80x25: case SW_TEXT_80x30: