Date: Mon, 23 Mar 2015 12:48:43 +0000 (UTC) From: Jakub Wojciech Klama <jceel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r280365 - user/jceel/soc2014_evdev/contrib/libevdev/libevdev Message-ID: <201503231248.t2NCmhcw053409@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jceel Date: Mon Mar 23 12:48:42 2015 New Revision: 280365 URL: https://svnweb.freebsd.org/changeset/base/280365 Log: Implement fetch_syspath_and_devnode() on FreeBSD. It uses custom ioctl to obtain uinput device path. Modified: user/jceel/soc2014_evdev/contrib/libevdev/libevdev/libevdev-uinput.c Modified: user/jceel/soc2014_evdev/contrib/libevdev/libevdev/libevdev-uinput.c ============================================================================== --- user/jceel/soc2014_evdev/contrib/libevdev/libevdev/libevdev-uinput.c Mon Mar 23 11:54:56 2015 (r280364) +++ user/jceel/soc2014_evdev/contrib/libevdev/libevdev/libevdev-uinput.c Mon Mar 23 12:48:42 2015 (r280365) @@ -204,6 +204,15 @@ fetch_syspath_and_devnode(struct libevde struct dirent **namelist; int ndev, i; +#ifdef __FreeBSD__ + char devnode[80]; + uinput_dev->syspath = strdup("unknown"); + + ioctl(uinput_dev->fd, UI_DEV_GETPATH, devnode); + asprintf(&uinput_dev->devnode, "/dev/%s", devnode); + return (0); +#endif + /* FIXME: use new ioctl() here once kernel supports it */ ndev = scandir(SYS_INPUT_DIR, &namelist, is_input_device, alphasort);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503231248.t2NCmhcw053409>