From c9929a4e0eab5eb94aebe7f91a91f37239d1bc6c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 16 Apr 2019 12:59:09 +0200 Subject: add device_open() --- fbtools.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fbtools.c') diff --git a/fbtools.c b/fbtools.c index 3158d2e..6c2d52b 100644 --- a/fbtools.c +++ b/fbtools.c @@ -24,6 +24,7 @@ #include "vt.h" #include "fbtools.h" +#include "logind.h" /* -------------------------------------------------------------------- */ /* internal variables */ @@ -225,7 +226,7 @@ gfxstate* fb_init(const char *device, char *mode) fprintf(stderr, "trying fbdev: %s ...\n", device); /* get current settings (which we have to restore) */ - if (-1 == (fb = open(device,O_RDWR | O_CLOEXEC))) { + if (-1 == (fb = device_open(device))) { fprintf(stderr,"open %s: %s\n",device,strerror(errno)); exit(1); } -- cgit