X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=rules%2Frules.d%2F60-persistent-v4l.rules;h=81f9bbd94daa5cdc6ad4366ba95308ddef04b5fe;hb=6205f1186e4980544ea425d31770358d1b2579e4;hp=0d673ab39627a311bebab816797a777d105c48f4;hpb=282988c4f8a85c28468e6442e86efe51dc71cc93;p=elogind.git diff --git a/rules/rules.d/60-persistent-v4l.rules b/rules/rules.d/60-persistent-v4l.rules index 0d673ab39..81f9bbd94 100644 --- a/rules/rules.d/60-persistent-v4l.rules +++ b/rules/rules.d/60-persistent-v4l.rules @@ -3,12 +3,16 @@ ACTION!="add|change", GOTO="persistent_v4l_end" SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" +SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" +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" IMPORT{program}="path_id %p" -ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}" +ENV{ID_PATH}=="?*", KERNEL=="video*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}" +ENV{ID_PATH}=="?*", KERNEL=="vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-vbi-index$attr{index}" ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}" LABEL="persistent_v4l_end"