Author: pebender
Date: Sun Dec 28 09:05:39 2008
New Revision: 4136
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/mm_uid
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/03-minimyth-persistent.rules
Log:
- Prepended kernel device name (without instance). This is needed for
hardware that creates multiple device types (e.g. the Wiimote).
- Added persistent device links for the Wiimote.
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Sun Dec 28
09:05:39 2008
@@ -1,7 +1,7 @@
MiniMyth Changelog
--------------------------------------------------------------------------------
-Changes since 62 (2008-12-27):
+Changes since 62 (2008-12-28):
Current MythTV versions
MythTV 0.20-softpad: version 0.20.2.softpad, release-0-20-fixes branch
svn 16082,
@@ -29,6 +29,11 @@
- Updated FFmpeg VDPAU support.
- Updated MPlayer VDPAU support.
- Updated Xine VDPAU support.
+
+Modified persistent device links
+ - Prepended kernel device name (without instance). This is needed for
+ hardware that creates multiple device types (e.g. the Wiimote).
+ - Added persistent device links for the Wiimote.
Fixed bugs
- Fixed a bug that prevented Wiimote devices from working.
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/mm_uid
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/mm_uid
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/mm_uid
Sun Dec 28 09:05:39 2008
@@ -5,14 +5,17 @@
# This script provides a unique identifier based on hardware information.
#
# The output has the formats:
-#
pci:<class>:<class_prog>:<vendor>:<device>:<subsystem_vendor>:<subsystem_device>:<bus_id>
-# usb:<idVendor>:<idProduct>:<serial>
+#
<kernel>-pci:<class>:<class_prog>:<vendor>:<device>:<subsystem_vendor>:<subsystem_device>:<bus_id>
+# <kernel>-phys:<phys>
+# <kernel>-usb:<idVendor>:<idProduct>:<serial>:<bInterfaceNumber>
+# <kernel>-wminput:<phys>
################################################################################
script='BEGIN
{
FS="\n"
RS=""
+ kernel=""
mm_uid=""
phys=""
bInterfaceNumber=""
@@ -24,6 +27,12 @@
subsystem=""
while ( x < NF ) {
x++
+ if ( $x ~ /^ *KERNEL==/ ) {
+ kernel=$x
+ sub(/^ *KERNEL=="/, "", kernel)
+ sub(/"$/, "", kernel)
+ sub(/[0-9]*$/, "", kernel)
+ }
if ( $x ~ /^ *SUBSYSTEMS?=="acpi"/ ) {
subsystem="acpi"
break
@@ -50,12 +59,24 @@
x++
}
if ( phys ) {
- mm_uid="phys:" phys
+ mm_uid=kernel "-phys:" phys
}
}
if ( subsystem == "input" ) {
+ driver=""
+ name=""
while ( x < NF ) {
x++
+ if ( $x ~ /^ *DRIVERS?==/ ) {
+ driver=$x
+ sub(/^ *DRIVERS?=="/, "", driver)
+ sub(/"$/, "", driver)
+ }
+ if ( $x ~ /^ *ATTRS?\{name\}==/ ) {
+ name=$x
+ sub(/^ *ATTRS?\{name\}=="/, "", name)
+ sub(/"$/, "", name)
+ }
if ( $x ~ /^ *ATTRS?\{phys\}==/ ) {
phys=$x
sub(/^ *ATTRS?\{phys\}=="/, "", phys)
@@ -63,6 +84,9 @@
gsub(/\//, ":", phys)
}
}
+ if ( ( driver == "" ) && ( name == "Nintendo Wiimote" ) &&
( phys ) ) {
+ mm_uid=kernel "-wminput:" phys
+ }
}
if ( subsystem == "pci" ) {
class=""
@@ -101,7 +125,7 @@
}
}
if ( class && class_prog && vendor && device &&
subsystem_vendor && subsystem_device && bus_id ) {
- mm_uid="pci:" class ":" class_prog ":" vendor ":"
device ":" subsystem_vendor ":" subsystem_device ":" bus_id
+ mm_uid=kernel "-pci:" class ":" class_prog ":"
vendor ":" device ":" subsystem_vendor ":" subsystem_device ":" bus_id
}
}
if ( subsystem == "serio" ) {
@@ -109,7 +133,7 @@
x++
}
if ( phys ) {
- mm_uid="phys:" phys
+ mm_uid=kernel "-phys:" phys
}
}
if ( subsystem == "usb" ) {
@@ -147,7 +171,7 @@
}
}
if ( idVendor && idProduct ) {
- mm_uid="usb:" idVendor ":" idProduct ":" serial ":"
bInterfaceNumber
+ mm_uid=kernel "-usb:" idVendor ":" idProduct ":"
serial ":" bInterfaceNumber
}
}
if ( mm_uid ) {
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/03-minimyth-persistent.rules
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/03-minimyth-persistent.rules
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/03-minimyth-persistent.rules
Sun Dec 28 09:05:39 2008
@@ -2,14 +2,11 @@
#
#-------------------------------------------------------------------------------
ACTION!="add|change", GOTO="end"
-KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="acpi|serio|usb",
GOTO="begin"
-KERNEL=="hiddev[0-9]*", SUBSYSTEM=="usb", SUBSYSTEMS=="usb",
GOTO="begin"
-KERNEL=="lcd[0-9]*", SUBSYSTEM=="lcd", SUBSYSTEMS=="usb",
GOTO="begin"
-KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", SUBSYSTEMS=="usb",
GOTO="begin"
-KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb",
GOTO="begin"
-GOTO="end"
-LABEL="begin"
-
-PROGRAM="mm_uid", RESULT=="?*", SYMLINK+="persistent/$result"
-
+KERNEL=="event[0-9]*", SUBSYSTEM=="input", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
+KERNEL=="hiddev[0-9]*", SUBSYSTEM=="usb", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
+KERNEL=="js[0-9]*", SUBSYSTEM=="input", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
+KERNEL=="lcd[0-9]*", SUBSYSTEM=="lcd", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
+KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
+KERNEL=="mouse[0-9]*", SUBSYSTEM=="input", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
+KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", PROGRAM="mm_uid",
RESULT=="?*", SYMLINK+="persistent/$result", GOTO="end"
LABEL="end"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---