diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-20 02:26:13 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-20 02:26:13 +0100 |
commit | 24239ded2d7a152d1c428880ae2cf82d904a350d (patch) | |
tree | c45f55645ed8154b1ced4610f4f588058663b946 /rules | |
parent | 874c43e42af96a43ff4983feeb91c1e6334eff6a (diff) |
rules: v4l - add by-id/ links for USB devices
/dev/v4l
|-- by-id
| |-- usb-046d_09a4_C4B15020-video-index0 -> ../../video0
| `-- usb-05a9_a511-video-index0 -> ../../video1
`-- by-path
|-- pci-0000:00:1d.0-usb-0:1:1.0-video-index0 -> ../../video1
`-- pci-0000:00:1d.7-usb-0:2:1.0-video-index0 -> ../../video0
Diffstat (limited to 'rules')
-rw-r--r-- | rules/rules.d/60-persistent-v4l.rules | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rules/rules.d/60-persistent-v4l.rules b/rules/rules.d/60-persistent-v4l.rules index 0d673ab396..fb961b79e0 100644 --- a/rules/rules.d/60-persistent-v4l.rules +++ b/rules/rules.d/60-persistent-v4l.rules @@ -3,6 +3,9 @@ ACTION!="add|change", GOTO="persistent_v4l_end" SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" +SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export" +KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}" + # check for valid "index" number TEST!="index", GOTO="persistent_v4l_end" ATTR{index}!="?*", GOTO="persistent_v4l_end" |