svn commit: r489372 - in head/x11/libinput: . files
Niclas Zeising
zeising at FreeBSD.org
Sat Jan 5 19:38:54 UTC 2019
Author: zeising
Date: Sat Jan 5 19:38:52 2019
New Revision: 489372
URL: https://svnweb.freebsd.org/changeset/ports/489372
Log:
x11/libinput: Fix crash when listing devices
Fix a crash in x11/libinput when listing devices with libinput list-devices.
This is done by removing an old patch previously used to work arond
permission issues with /dev/input/*
PR: 234638
Reported by: Jan Beich
Fix from: Greg V
Reviewed by: Greg V
MFH: 2019Q1
Modified:
head/x11/libinput/Makefile
head/x11/libinput/files/patch-src_evdev.c
Modified: head/x11/libinput/Makefile
==============================================================================
--- head/x11/libinput/Makefile Sat Jan 5 19:35:21 2019 (r489371)
+++ head/x11/libinput/Makefile Sat Jan 5 19:38:52 2019 (r489372)
@@ -2,6 +2,7 @@
PORTNAME= libinput
PORTVERSION= 1.11.3
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://freedesktop.org/software/${PORTNAME}/
Modified: head/x11/libinput/files/patch-src_evdev.c
==============================================================================
--- head/x11/libinput/files/patch-src_evdev.c Sat Jan 5 19:35:21 2019 (r489371)
+++ head/x11/libinput/files/patch-src_evdev.c Sat Jan 5 19:38:52 2019 (r489372)
@@ -35,53 +35,3 @@ so we just use them instead of the original (enumerate
device->source = NULL;
}
}
-@@ -1785,9 +1796,9 @@ evdev_notify_added_device(struct evdev_device *device)
- }
-
- static bool
--evdev_device_have_same_syspath(struct udev_device *udev_device, int fd)
-+evdev_device_have_same_syspath(struct udev_device **udev_device, int fd, bool reopen)
- {
-- struct udev *udev = udev_device_get_udev(udev_device);
-+ struct udev *udev = udev_device_get_udev(*udev_device);
- struct udev_device *udev_device_new = NULL;
- struct stat st;
- bool rc = false;
-@@ -1800,10 +1811,16 @@ evdev_device_have_same_syspath(struct udev_device *ude
- goto out;
-
- rc = streq(udev_device_get_syspath(udev_device_new),
-- udev_device_get_syspath(udev_device));
-+ udev_device_get_syspath(*udev_device));
- out:
-- if (udev_device_new)
-- udev_device_unref(udev_device_new);
-+ if (udev_device_new) {
-+ if (reopen) {
-+ udev_device_unref(*udev_device);
-+ *udev_device = udev_device_new;
-+ } else {
-+ udev_device_unref(udev_device_new);
-+ }
-+ }
- return rc;
- }
-
-@@ -2003,7 +2020,7 @@ evdev_device_create(struct libinput_seat *seat,
- return NULL;
- }
-
-- if (!evdev_device_have_same_syspath(udev_device, fd))
-+ if (!evdev_device_have_same_syspath(&udev_device, fd, true))
- goto err;
-
- device = zalloc(sizeof *device);
-@@ -2559,7 +2576,7 @@ evdev_device_resume(struct evdev_device *device)
- if (fd < 0)
- return -errno;
-
-- if (!evdev_device_have_same_syspath(device->udev_device, fd)) {
-+ if (!evdev_device_have_same_syspath(&device->udev_device, fd, false)) {
- close_restricted(libinput, fd);
- return -ENODEV;
- }
More information about the svn-ports-head
mailing list