summaryrefslogtreecommitdiff
path: root/rules/rules.d/60-persistent-v4l.rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules/rules.d/60-persistent-v4l.rules')
-rw-r--r--rules/rules.d/60-persistent-v4l.rules3
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"