[Mesa-dev] [PATCH 2/4] loader: use loader_open_device() to handle O_CLOEXEC
Emil Velikov
emil.l.velikov at gmail.com
Tue Feb 19 15:30:39 UTC 2019
From: Emil Velikov <emil.velikov at collabora.com>
Some platforms lack O_CLOEXEC. The loader_open_device() handles those
appropriately, so use the helper.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/loader/loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 56187080bbc..c578e3f0849 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -125,7 +125,7 @@ loader_open_render_node(const char *name)
(device->bustype == DRM_BUS_PLATFORM)) {
drmVersionPtr version;
- fd = open(device->nodes[DRM_NODE_RENDER], O_RDWR | O_CLOEXEC);
+ fd = loader_open_device(device->nodes[DRM_NODE_RENDER]);
if (fd < 0)
continue;
--
2.20.1
More information about the mesa-dev
mailing list