mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
Several rules match ID_USB_INTERFACES directly to classify USB devices. Add a `usb-interface` property to hwdb, looked up for each USB device, so that such matches can live in the hwdb instead. The key also contains vendor and product IDs, so that single devices can be matched. We also add ID_LINK_DIR. When a hwdb entry sets it, the new 60-persistent-usb.rules creates by-id and by-path symlinks below /dev/<ID_LINK_DIR>/, so a device class doesn't need its own rules file for this.
14 lines
606 B
Plaintext
14 lines
606 B
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
ACTION=="remove", GOTO="persistent_usb_end"
|
|
SUBSYSTEM!="usb", GOTO="persistent_usb_end"
|
|
ENV{DEVTYPE}!="usb_device", GOTO="persistent_usb_end"
|
|
ENV{ID_LINK_DIR}!="?*", GOTO="persistent_usb_end"
|
|
|
|
IMPORT{builtin}="path_id"
|
|
ENV{ID_SERIAL}=="?*", SYMLINK+="$env{ID_LINK_DIR}/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
|
|
ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="$env{ID_LINK_DIR}/by-path/$env{ID_PATH_WITH_USB_REVISION}"
|
|
ENV{ID_PATH_WITH_USB_REVISION}=="", ENV{ID_PATH}=="?*", SYMLINK+="$env{ID_LINK_DIR}/by-path/$env{ID_PATH}"
|
|
|
|
LABEL="persistent_usb_end"
|