Commit b31c9d9
HID: hidraw: add HIDIOCREVOKE ioctl
There is a need for userspace applications to open HID devices directly.
Use-cases include configuration of gaming mice or direct access to
joystick devices. The latter is currently handled by the uaccess tag in
systemd, other devices include more custom/local configurations or just
sudo.
A better approach is what we already have for evdev devices: give the
application a file descriptor and revoke it when it may no longer access
that device.
This patch is the hidraw equivalent to the EVIOCREVOKE ioctl, see
commit c7dc657 ("Input: evdev - add EVIOCREVOKE ioctl") for full
details.
An MR for systemd-logind has been filed here:
systemd/systemd#33970
Signed-off-by: Peter Hutterer <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Benjamin Tissoires <[email protected]>1 parent 6e44365 commit b31c9d9
3 files changed
+37
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
| 172 | + | |
164 | 173 | | |
165 | 174 | | |
166 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
| |||
256 | 268 | | |
257 | 269 | | |
258 | 270 | | |
259 | | - | |
| 271 | + | |
260 | 272 | | |
261 | 273 | | |
262 | 274 | | |
| |||
320 | 332 | | |
321 | 333 | | |
322 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
323 | 338 | | |
324 | 339 | | |
325 | 340 | | |
| |||
372 | 387 | | |
373 | 388 | | |
374 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
375 | 397 | | |
376 | 398 | | |
377 | 399 | | |
378 | 400 | | |
379 | 401 | | |
380 | 402 | | |
381 | 403 | | |
| 404 | + | |
382 | 405 | | |
383 | 406 | | |
384 | 407 | | |
385 | 408 | | |
386 | | - | |
| 409 | + | |
387 | 410 | | |
388 | 411 | | |
389 | 412 | | |
| |||
421 | 444 | | |
422 | 445 | | |
423 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
424 | 455 | | |
425 | 456 | | |
426 | 457 | | |
| |||
527 | 558 | | |
528 | 559 | | |
529 | 560 | | |
530 | | - | |
| 561 | + | |
531 | 562 | | |
532 | 563 | | |
533 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
0 commit comments