summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2003-10-24 20:02:45 +0000
committerdrahn <drahn@openbsd.org>2003-10-24 20:02:45 +0000
commit97178192916c2fdfd795cd017daf8eb6352990b9 (patch)
tree54d8422525db88834d6c4facd290a954f440a193
parentIPKDB has never been supported in OpenBSD/powerpc/macppc delete this (diff)
downloadwireguard-openbsd-97178192916c2fdfd795cd017daf8eb6352990b9.tar.xz
wireguard-openbsd-97178192916c2fdfd795cd017daf8eb6352990b9.zip
If cons_backlight_available is not set, cons_brightness will not be valid,
return -1 to indicate so. same as WSDISPLAYIO_PARAM_BACKLIGHT.
-rw-r--r--sys/arch/macppc/pci/vgafb.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/macppc/pci/vgafb.c b/sys/arch/macppc/pci/vgafb.c
index ce1a057a557..3bfef2eba27 100644
--- a/sys/arch/macppc/pci/vgafb.c
+++ b/sys/arch/macppc/pci/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.21 2003/10/15 23:00:57 drahn Exp $ */
+/* $OpenBSD: vgafb.c,v 1.22 2003/10/24 20:02:45 drahn Exp $ */
/* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */
/*
@@ -278,10 +278,13 @@ vgafb_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
switch (dp->param) {
case WSDISPLAYIO_PARAM_BRIGHTNESS:
- dp->min = MIN_BRIGHTNESS;
- dp->max = MAX_BRIGHTNESS;
- dp->curval = cons_brightness;
- return 0;
+ if (cons_backlight_available != 0) {
+ dp->min = MIN_BRIGHTNESS;
+ dp->max = MAX_BRIGHTNESS;
+ dp->curval = cons_brightness;
+ return 0;
+ }
+ return -1;
case WSDISPLAYIO_PARAM_BACKLIGHT:
if (cons_backlight_available != 0) {
dp->min = 0;