diff options
Diffstat (limited to 'firmware/target/hosted/lcd-linuxfb.c')
-rw-r--r-- | firmware/target/hosted/lcd-linuxfb.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/firmware/target/hosted/lcd-linuxfb.c b/firmware/target/hosted/lcd-linuxfb.c index e85b920fef..14c8c30f89 100644 --- a/firmware/target/hosted/lcd-linuxfb.c +++ b/firmware/target/hosted/lcd-linuxfb.c | |||
@@ -47,17 +47,12 @@ static void redraw(void) | |||
47 | void lcd_init_device(void) | 47 | void lcd_init_device(void) |
48 | { | 48 | { |
49 | const char * const fb_dev = "/dev/fb0"; | 49 | const char * const fb_dev = "/dev/fb0"; |
50 | fd = open(fb_dev, O_RDWR /* | O_SYNC */); | 50 | fd = open(fb_dev, O_RDWR | O_CLOEXEC); |
51 | if(fd < 0) | 51 | if(fd < 0) |
52 | { | 52 | { |
53 | panicf("Cannot open framebuffer: %s\n", fb_dev); | 53 | panicf("Cannot open framebuffer: %s\n", fb_dev); |
54 | } | 54 | } |
55 | 55 | ||
56 | if (fcntl( fd, F_SETFD, FD_CLOEXEC ) < 0) | ||
57 | { | ||
58 | panicf("Can't set CLOEXEC"); | ||
59 | } | ||
60 | |||
61 | /* get fixed and variable information */ | 56 | /* get fixed and variable information */ |
62 | if(ioctl(fd, FBIOGET_FSCREENINFO, &finfo) < 0) | 57 | if(ioctl(fd, FBIOGET_FSCREENINFO, &finfo) < 0) |
63 | { | 58 | { |