File: 60-persistent-hidraw.rules

package info (click to toggle)
systemd-udeb 259-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 104,120 kB
  • sloc: ansic: 726,480; xml: 121,118; python: 35,852; sh: 33,447; cpp: 946; awk: 102; makefile: 89; lisp: 13; sed: 1
file content (26 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="persistent_hidraw_end"
SUBSYSTEM!="hidraw", GOTO="persistent_hidraw_end"
KERNEL!="hidraw*", GOTO="persistent_hidraw_end"

SUBSYSTEMS=="usb", ENV{ID_BUS}=="", IMPORT{builtin}="usb_id"
SUBSYSTEMS=="usb", IMPORT{builtin}="path_id"

ENV{ID_BUS}=="", GOTO="persistent_hidraw_bus_end"

# by-id links
ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-hidraw"
ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-hidraw"

# add a more readable 'fido' link for devices with ID_FIDO_TOKEN==1
ENV{ID_FIDO_TOKEN}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-fido"
ENV{ID_FIDO_TOKEN}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-fido"

LABEL="persistent_hidraw_bus_end"

# by-path
ENV{ID_PATH}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-hidraw"
ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="input/by-path/$env{ID_PATH_WITH_USB_REVISION}-hidraw"

LABEL="persistent_hidraw_end"