mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
fb_generic: open device O_CLOEXEC, better diagnostic output
This commit is contained in:
committed by
M. Liebmann
parent
1500716fcf
commit
8441a719cb
@@ -145,7 +145,7 @@ void CFrameBuffer::init(const char * const fbDevice)
|
||||
{
|
||||
int tr = 0xFF;
|
||||
|
||||
fd = open(fbDevice, O_RDWR);
|
||||
fd = open(fbDevice, O_RDWR|O_CLOEXEC);
|
||||
|
||||
if (fd<0) {
|
||||
perror(fbDevice);
|
||||
@@ -165,9 +165,8 @@ void CFrameBuffer::init(const char * const fbDevice)
|
||||
}
|
||||
|
||||
available=fix.smem_len;
|
||||
printf("[fb_generic] %dk video mem\n", available/1024);
|
||||
printf("[fb_generic] [%s] framebuffer %dk video mem\n", fix.id, available/1024);
|
||||
lbb = lfb = (fb_pixel_t*)mmap(0, available, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0);
|
||||
|
||||
if (!lfb) {
|
||||
perror("mmap");
|
||||
goto nolfb;
|
||||
|
Reference in New Issue
Block a user