diff -u udev-113/debian/rules.d/60-symlinks.rules udev-113/debian/rules.d/60-symlinks.rules --- udev-113/debian/rules.d/60-symlinks.rules +++ udev-113/debian/rules.d/60-symlinks.rules @@ -16,0 +17,14 @@ + +# Create video4linux PCI path symlinks +ACTION!="add", GOTO="video4linux_path_end" +SUBSYSTEM!="video4linux", GOTO="video4linux_path_end" + +IMPORT{program}="path_id %p" +# This is limited to the first 10 video devices to avoid per-driver +# device duplication (like ivtv), since we have no way to distinguish +# interfaces via sysfs in a driver-agnostic way yet. If OPTIONS allowed +# replacement, we could set link_priority to -%m to give preference to the +# first v4l interface per physical device. +ENV{ID_PATH}=="?*", KERNEL=="video[0-9]", SYMLINK+="v4l/by-path/$env{ID_PATH}" + +LABEL="video4linux_path_end" diff -u udev-113/debian/changelog udev-113/debian/changelog --- udev-113/debian/changelog +++ udev-113/debian/changelog @@ -1,3 +1,10 @@ +udev (113-0ubuntu6) gutsy; urgency=low + + * debian/patches/81-extras-path_id.patch, debian/rules.d/60-symlinks.rules: + Add video4linux by-path symlink handling. + + -- Kees Cook Wed, 18 Jul 2007 11:09:48 -0700 + udev (113-0ubuntu5) gutsy; urgency=low * Reupload. only in patch2: unchanged: --- udev-113.orig/debian/patches/81-extras-path_id.patch +++ udev-113/debian/patches/81-extras-path_id.patch @@ -0,0 +1,31 @@ +--- udev-113~/extras/path_id/path_id 2007-07-18 11:07:15.000000000 -0700 ++++ udev-113/extras/path_id/path_id 2007-07-18 11:08:05.000000000 -0700 +@@ -551,6 +551,17 @@ handle_device () { + d="$d-${rewind}st${mode}" + fi + fi ++ # v4l sysfs tree doesn't include driver details ++ if [ "$TYPE" = "video4linux" ] ; then ++ if [ -e "$full_sysfs_device_path/driver" ]; then ++ cd "$full_sysfs_device_path"/driver ++ driver="`pwd -P`" ++ cd "$OPWD" ++ if [ -n "$driver" ]; then ++ d="${d}${driver##*/}" ++ fi ++ fi ++ fi + } + + case "$TYPE" in +@@ -566,6 +577,10 @@ case "$TYPE" in + handle_device + echo "ID_PATH=$d" + ;; ++ video4linux) ++ handle_device ++ echo "ID_PATH=$d" ++ ;; + *) + RESULT=1 + ;;