summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-06-29 14:03:22 +0100
committerEmil Velikov <[email protected]>2015-07-13 19:57:59 +0100
commitdd50ccf0f4dcba2fd586d5b5c58750259e29c357 (patch)
treec7c8baf42bb5799ae34c8185eb580ebe430c436e /src/gallium/auxiliary/vl
parentcc32d25454c382a971e81ae584a4296fdf492e70 (diff)
auxiliary/vl: use loader_open_device() over open()
The former handles O_CLOEXEC (and the lack of it) appropriately. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_winsys_dri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri.c b/src/gallium/auxiliary/vl/vl_winsys_dri.c
index 8e39569f515..b445f68a1c7 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri.c
@@ -37,6 +37,8 @@
#include <xf86drm.h>
#include <errno.h>
+#include "loader.h"
+
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
#include "pipe/p_state.h"
@@ -361,7 +363,7 @@ vl_screen_create(Display *display, int screen)
if (!device_name)
goto free_connect;
memcpy(device_name, xcb_dri2_connect_device_name(connect), device_name_length);
- fd = open(device_name, O_RDWR);
+ fd = loader_open_device(device_name);
free(device_name);
if (fd < 0)