mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
![Max Staudt](/assets/img/avatar_default.png)
As a follow-up in the style of:873be895ed
("udev: add USB revision in ID_PATH") this patch adds a second symlink for media controllers, this time including the USB revision. This means that in addition to persistent symlinks like: pci-0000:04:00.3-usb-0:1:1.0-media-controller -> ../../media0 We now also get: pci-0000:04:00.3-usbv2-0:1:1.0-media-controller -> ../../media0 ...which helps distinguish media devices plugged into different USB root hubs provided by the same PCI card, at least as long as they are for different USB revisions. Fixes:04f19d6735
("udev: Add /dev/media/by-path symlinks for media controllers")
14 lines
556 B
Plaintext
14 lines
556 B
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
# Media controller rules
|
|
|
|
ACTION=="remove", GOTO="persistent_media_ctl_end"
|
|
SUBSYSTEM!="media", GOTO="persistent_media_ctl_end"
|
|
ENV{MAJOR}=="", GOTO="persistent_media_ctl_end"
|
|
|
|
IMPORT{builtin}="path_id"
|
|
KERNEL=="media*", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="media/by-path/$env{ID_PATH_WITH_USB_REVISION}-media-controller"
|
|
KERNEL=="media*", ENV{ID_PATH_WITH_USB_REVISION}=="", ENV{ID_PATH}=="?*", SYMLINK+="media/by-path/$env{ID_PATH}-media-controller"
|
|
|
|
LABEL="persistent_media_ctl_end"
|