Message ID | 201402181855.s1IItjEZ005579@glazunov.sibelius.xs4all.nl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Feb 18, 2014 at 07:55:46PM +0100, Mark Kettenis wrote: > > Date: Tue, 18 Feb 2014 08:06:36 +0000 > > From: Chris Wilson <chris@chris-wilson.co.uk> > > > > On Sat, Feb 15, 2014 at 09:29:42PM +0100, Mark Kettenis wrote: > > > Fallout from the backlight helper changes. > > > > Apologies for missing this earlier. I have rearranged the code once > > again to try to push the OpenBSD specifics down into src/backlight.c, > > can you please check what needs to be fixed up now? > > No worries. > > Here's a new diff against master. Thank you, pushed. commit c91af569ee90a832899c9038badd84921e9a87fc Author: Mark Kettenis <mark.kettenis@xs4all.nl> Date: Tue Feb 18 19:02:14 2014 +0000 backlight: Build fixes for OpenBSD -Chris
diff --git a/src/backlight.c b/src/backlight.c index 688819d..3c3f152 100644 --- a/src/backlight.c +++ b/src/backlight.c @@ -32,6 +32,7 @@ #include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> +#include <sys/ioctl.h> #include <stdio.h> #include <stdlib.h> @@ -71,13 +72,14 @@ #ifdef __OpenBSD__ #include <dev/wscons/wsconsio.h> +#include <xf86Priv.h> int backlight_set(struct backlight *b, int level) { struct wsdisplay_param param; if (b->iface == NULL) - return; + return -1; if ((unsigned)level > b->max) level = b->max; @@ -129,6 +131,14 @@ int backlight_open(struct backlight *b, char *iface) return param.curval; } +enum backlight_type backlight_exists(const char *iface) +{ + if (iface != NULL) + return BL_NONE; + + return BL_PLATFORM; +} + #else static int