[Mesa-dev] [PATCH 2/4] loader: use loader_open_device() to handle O_CLOEXEC
Eric Engestrom
eric.engestrom at intel.com
Tue Feb 19 16:08:31 UTC 2019
On Tuesday, 2019-02-19 15:30:39 +0000, Emil Velikov wrote:
> 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>
I'll review 1 & 3 later, but 2 & 4 are:
Reviewed-by: Eric Engestrom <eric.engestrom at intel.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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list