diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-07-27 07:57:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-07-27 07:57:27 +0000 |
commit | d4a0bed4b91da9de86c311c7fef9a8aa9a6f500c (patch) | |
tree | a1b439049dee87bc951e190db93f5bbe8b43b0b5 /xserver/hw/xfree86/os-support/linux/lnx_platform.c | |
parent | b6bc775539a31f663f9e22ce3ccaf0aa96adf3b6 (diff) |
Update to xserver 1.20.5. Tested by jsg@
Diffstat (limited to 'xserver/hw/xfree86/os-support/linux/lnx_platform.c')
-rw-r--r-- | xserver/hw/xfree86/os-support/linux/lnx_platform.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/xserver/hw/xfree86/os-support/linux/lnx_platform.c b/xserver/hw/xfree86/os-support/linux/lnx_platform.c index 1d145b362..70374ace8 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_platform.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_platform.c @@ -26,19 +26,16 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) drmSetVersion sv; drmVersionPtr v; char *buf; - int major, minor, fd; + int fd; int err = 0; Bool paused, server_fd = FALSE; - major = attribs->major; - minor = attribs->minor; - - fd = systemd_logind_take_fd(major, minor, path, &paused); + fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused); if (fd != -1) { if (paused) { LogMessage(X_ERROR, "Error systemd-logind returned paused fd for drm node\n"); - systemd_logind_release_fd(major, minor, -1); + systemd_logind_release_fd(attribs->major, attribs->minor, -1); return FALSE; } attribs->fd = fd; @@ -46,7 +43,7 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) } if (fd == -1) - fd = open(path, O_RDWR, O_CLOEXEC); + fd = open(path, O_RDWR | O_CLOEXEC, 0); if (fd == -1) return FALSE; |