egl: Use the loader_open_device() helper to do open with CLOEXEC
authorDerek Foreman <derekf@osg.samsung.com>
Wed, 17 Jun 2015 16:28:51 +0000 (11:28 -0500)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 23 Jun 2015 15:54:56 +0000 (16:54 +0100)
commit4f8f790525f1adcb5259cb72b7c9dbfd121867c6
treec244e9662035fdcb1fda5be579aa70e79b33292d
parent324ee9b391ea2db4b74709d30a131e79055bf071
egl: Use the loader_open_device() helper to do open with CLOEXEC

We've moved the open with CLOEXEC idiom into a helper function, so
call it instead of duplicating the code.

This also replaces a couple of opens that didn't properly do CLOEXEC.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/platform_drm.c
src/egl/drivers/dri2/platform_surfaceless.c
src/egl/drivers/dri2/platform_wayland.c
src/egl/drivers/dri2/platform_x11.c