diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-08-21 13:47:02 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-21 10:29:41 +0200 |
commit | bcdce02d9bc8150e1d191ed5ca9da45b7604964a (patch) | |
tree | 3b2faf509db7672ee1fc98857736470be97e7ed8 /freebsd/sys/dev/evdev | |
parent | Update to FreeBSD head 2018-04-01 (diff) | |
download | rtems-libbsd-bcdce02d9bc8150e1d191ed5ca9da45b7604964a.tar.bz2 |
Update to FreeBSD head 2018-06-01
Git mirror commit fb63610a69b0eb7f69a201ba05c4c1a7a2739cf9.
Update #3472.
Diffstat (limited to 'freebsd/sys/dev/evdev')
-rw-r--r-- | freebsd/sys/dev/evdev/uinput.c | 9 | ||||
-rw-r--r-- | freebsd/sys/dev/evdev/uinput.h | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/freebsd/sys/dev/evdev/uinput.c b/freebsd/sys/dev/evdev/uinput.c index f1f812cc..3b332d1f 100644 --- a/freebsd/sys/dev/evdev/uinput.c +++ b/freebsd/sys/dev/evdev/uinput.c @@ -606,6 +606,15 @@ uinput_ioctl_sub(struct uinput_cdev_state *state, u_long cmd, caddr_t data) evdev_set_phys(state->ucs_evdev, buf); return (0); + case UI_SET_BSDUNIQ: + if (state->ucs_state == UINPUT_RUNNING) + return (EINVAL); + ret = copyinstr(*(void **)data, buf, sizeof(buf), NULL); + if (ret != 0) + return (ret); + evdev_set_serial(state->ucs_evdev, buf); + return (0); + case UI_SET_SWBIT: if (state->ucs_state == UINPUT_RUNNING || intdata > SW_MAX || intdata < 0) diff --git a/freebsd/sys/dev/evdev/uinput.h b/freebsd/sys/dev/evdev/uinput.h index dd4b0a82..d15b8945 100644 --- a/freebsd/sys/dev/evdev/uinput.h +++ b/freebsd/sys/dev/evdev/uinput.h @@ -90,6 +90,13 @@ struct uinput_abs_setup { #define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase) #define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase) +/* + * FreeBSD specific. Set unique identifier of input device. + * Name and magic are chosen to reduce chances of clashing + * with possible future Linux extensions. + */ +#define UI_SET_BSDUNIQ _IO(UINPUT_IOCTL_BASE, 109) + #define EV_UINPUT 0x0101 #define UI_FF_UPLOAD 1 #define UI_FF_ERASE 2 |