r1179 - trunk/udev

jim at linuxfromscratch.org jim at linuxfromscratch.org
Tue Feb 14 19:52:38 PST 2006


Author: jim
Date: 2006-02-14 20:52:37 -0700 (Tue, 14 Feb 2006)
New Revision: 1179

Added:
   trunk/udev/60-persistent-disk.rules
   trunk/udev/61-persistent-input.rules
Removed:
   trunk/udev/60-persistent.rules
   trunk/udev/input.sh
Modified:
   trunk/udev/
   trunk/udev/05-udev-early.rules
   trunk/udev/50-udev.rules
   trunk/udev/Makefile
   trunk/udev/show_event_log
Log:
 r1263 at server:  jim | 2006-02-14 19:52:14 -0800
 Updates from Upstream



Property changes on: trunk/udev
___________________________________________________________________
Name: svk:merge
   - 3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1208
   + 3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263

Modified: trunk/udev/05-udev-early.rules
===================================================================
--- trunk/udev/05-udev-early.rules	2006-02-14 09:05:26 UTC (rev 1178)
+++ trunk/udev/05-udev-early.rules	2006-02-15 03:52:37 UTC (rev 1179)
@@ -14,12 +14,13 @@
 #
 ########################################################################
 
-# sysfs is populated after the event is sent
-#
-ACTION=="add",	DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
-ACTION=="add",	SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
-
 # ignore these events until someone needs them
 #
 SUBSYSTEM=="drivers",		OPTIONS="ignore_device"
 SUBSYSTEM=="module",		OPTIONS="ignore_device"
+
+# sysfs is populated after the event is sent
+#
+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
+ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"

Modified: trunk/udev/50-udev.rules
===================================================================
--- trunk/udev/50-udev.rules	2006-02-14 09:05:26 UTC (rev 1178)
+++ trunk/udev/50-udev.rules	2006-02-15 03:52:37 UTC (rev 1179)
@@ -60,7 +60,6 @@
 KERNEL=="ts*",			NAME="input/%k", MODE="0600"
 KERNEL=="uinput",		NAME="input/%k", MODE="0600"
 KERNEL=="lirc0",		NAME="%k", SYMLINK+="lirc"
-KERNEL=="input[0-9]*", 		ACTION=="add", RUN+="input.sh"
 
 # printer
 SUBSYSTEM=="usb",		KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"

Added: trunk/udev/60-persistent-disk.rules
===================================================================
--- trunk/udev/60-persistent-disk.rules	                        (rev 0)
+++ trunk/udev/60-persistent-disk.rules	2006-02-15 03:52:37 UTC (rev 1179)
@@ -0,0 +1,64 @@
+########################################################################
+#
+# Description : 60-persistent-disk.rules
+#
+# Authors     : Based on Open Suse Udev Rules
+#               kay.sievers at suse.de and hare at suse.de
+#
+# Adapted to  : Jim Gifford
+# LFS
+#
+# Version     : 00.01
+#
+# Notes       :
+#
+########################################################################
+
+# persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path}
+# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare at suse.de>
+
+ACTION!="add",		GOTO="persistent_end"
+SUBSYSTEM!="block",	GOTO="persistent_end"
+
+# skip rules for inappropriate block devices
+KERNEL=="ram*|loop*|fd*|nbd*",	GOTO="persistent_end"
+
+# never access removable ide devices, the drivers are causing event loops on open()
+BUS=="ide",	DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end"
+
+# by-id (hardware serial number)
+KERNEL=="hd*[!0-9]",	IMPORT{program}="/sbin/ata_id --export $tempnode"
+KERNEL=="hd*[!0-9]",	ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
+KERNEL=="hd*[0-9]",	IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
+
+KERNEL=="sd*[!0-9]|sr*",		SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
+KERNEL=="sd*[!0-9]|sr*",		ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x"
+KERNEL=="sd*[!0-9]|sr*",		ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode"
+KERNEL=="sd*[!0-9]|sr*",		ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode"
+KERNEL=="dasd*[!0-9]",			IMPORT{program}="/sbin/dasd_id --export $tempnode"
+KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]",	ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+# for partitions import parent information
+KERNEL=="sd*[0-9]|dasd*[0-9]",	IMPORT{parent}=="ID_*"
+KERNEL=="sd*[0-9]|dasd*[0-9]",	ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
+
+# by-path (shortest physical path)
+KERNEL=="*[!0-9]|sr*",	ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
+KERNEL=="sr*",		GOTO="persistent_end"
+KERNEL=="*[0-9]",	IMPORT{parent}=="ID_*"
+KERNEL=="*[0-9]",	ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
+
+# by-label/by-uuid (filesystem properties)
+KERNEL=="*[!0-9]",		SYSFS{removable}=="1", GOTO="persistent_end"
+IMPORT{program}="/sbin/vol_id --export $tempnode"
+ENV{ID_FS_UUID}=="?*",		SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_LABEL_SAFE}=="?*",	SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+
+# BIOS Enhanced Disk Device
+KERNEL=="*[!0-9]",	IMPORT{program}="/sbin/edd_id --export $tempnode"
+KERNEL=="*[!0-9]",	ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
+KERNEL=="*[0-9]",	ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
+
+KERNEL=="dm-[0-9]*",	ACTION=="add", PROGRAM="/sbin/dmsetup info -c --noopencount --noheadings -o name -j %M -m %m", SYMLINK="disk/by-name/%c"
+
+LABEL="persistent_end"

Deleted: trunk/udev/60-persistent.rules
===================================================================
--- trunk/udev/60-persistent.rules	2006-02-14 09:05:26 UTC (rev 1178)
+++ trunk/udev/60-persistent.rules	2006-02-15 03:52:37 UTC (rev 1179)
@@ -1,64 +0,0 @@
-########################################################################
-#
-# Description : 60-persistent.rules
-#
-# Authors     : Based on Open Suse Udev Rules
-#               kay.sievers at suse.de and hare at suse.de
-#
-# Adapted to  : Jim Gifford
-# LFS
-#
-# Version     : 00.01
-#
-# Notes       :
-#
-########################################################################
-
-# persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path}
-# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare at suse.de>
-
-ACTION!="add",		GOTO="persistent_end"
-SUBSYSTEM!="block",	GOTO="persistent_end"
-
-# skip rules for inappropriate block devices
-KERNEL=="ram*|loop*|fd*|nbd*",	GOTO="persistent_end"
-
-# never access removable ide devices, the drivers are causing event loops on open()
-BUS=="ide",	DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end"
-
-# by-id (hardware serial number)
-KERNEL=="hd*[!0-9]",	IMPORT{program}="/sbin/ata_id --export $tempnode"
-KERNEL=="hd*[!0-9]",	ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
-KERNEL=="hd*[0-9]",	IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
-
-KERNEL=="sd*[!0-9]|sr*",		SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
-KERNEL=="sd*[!0-9]|sr*",		ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x"
-KERNEL=="sd*[!0-9]|sr*",		ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode"
-KERNEL=="sd*[!0-9]|sr*",		ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode"
-KERNEL=="dasd*[!0-9]",			IMPORT{program}="/sbin/dasd_id --export $tempnode"
-KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]",	ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
-
-# for partitions import parent information
-KERNEL=="sd*[0-9]|dasd*[0-9]",	IMPORT{parent}=="ID_*"
-KERNEL=="sd*[0-9]|dasd*[0-9]",	ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
-
-# by-path (shortest physical path)
-KERNEL=="*[!0-9]|sr*",	ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
-KERNEL=="sr*",		GOTO="persistent_end"
-KERNEL=="*[0-9]",	IMPORT{parent}=="ID_*"
-KERNEL=="*[0-9]",	ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
-
-# by-label/by-uuid (filesystem properties)
-KERNEL=="*[!0-9]",		SYSFS{removable}=="1", GOTO="persistent_end"
-IMPORT{program}="/sbin/vol_id --export $tempnode"
-ENV{ID_FS_UUID}=="?*",		SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
-ENV{ID_FS_LABEL_SAFE}=="?*",	SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
-
-# BIOS Enhanced Disk Device
-KERNEL=="*[!0-9]",	IMPORT{program}="/sbin/edd_id --export $tempnode"
-KERNEL=="*[!0-9]",	ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
-KERNEL=="*[0-9]",	ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
-
-KERNEL=="dm-[0-9]*",	ACTION=="add", PROGRAM="/sbin/dmsetup info -c --noopencount --noheadings -o name -j %M -m %m", SYMLINK="disk/by-name/%c"
-
-LABEL="persistent_end"

Added: trunk/udev/61-persistent-input.rules
===================================================================
--- trunk/udev/61-persistent-input.rules	                        (rev 0)
+++ trunk/udev/61-persistent-input.rules	2006-02-15 03:52:37 UTC (rev 1179)
@@ -0,0 +1,35 @@
+########################################################################
+#
+# Description : 61-persistent-input.rules
+#
+# Authors     : Based on Open Suse Udev Rules
+#               kay.sievers at suse.de and hare at suse.de
+#
+# Adapted to  : Jim Gifford
+# LFS
+#
+# Version     : 00.01
+#
+# Notes       :
+#
+########################################################################
+
+ACTION!="add", 		GOTO="persistent_input_end"
+SUBSYSTEM!="input", 	GOTO="persistent_input_end"
+KERNEL=="input[0-9]*", 	GOTO="persistent_input_end"
+
+# usb devices
+BUS=="usb", IMPORT{program}="/sbin/usb_id -x"
+BUS=="usb", SYSFS{bInterfaceClass}="03", SYSFS{bInterfaceProtocol}="01", ENV{ID_CLASS}="kbd"
+BUS=="usb", SYSFS{bInterfaceClass}="03", SYSFS{bInterfaceProtocol}="02", ENV{ID_CLASS}="mouse"
+
+# by-id links
+KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
+KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
+
+# by-path
+IMPORT{program}="/sbin/path_id %p"
+ENV{ID_PATH}=="?*", KERNEL=="mouse*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
+ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
+
+LABEL="persistent_input_end"

Modified: trunk/udev/Makefile
===================================================================
--- trunk/udev/Makefile	2006-02-14 09:05:26 UTC (rev 1178)
+++ trunk/udev/Makefile	2006-02-15 03:52:37 UTC (rev 1179)
@@ -17,7 +17,8 @@
 	install -m ${RULESMODE} 40-modprobe.rules ${DESTDIR}/etc/udev/rules.d/40-modprobe.rules
 	install -m ${RULESMODE} 50-udev.rules ${DESTDIR}/etc/udev/rules.d/50-udev.rules
 	install -m ${RULESMODE} 55-sound.rules ${DESTDIR}/etc/udev/rules.d/55-sound.rules
-	install -m ${RULESMODE} 60-persistent.rules ${DESTDIR}/etc/udev/rules.d/60-persistent.rules
+	install -m ${RULESMODE} 60-persistent-disk.rules ${DESTDIR}/etc/udev/rules.d/60-persistent-disk.rules
+	install -m ${RULESMODE} 61-persistent-input.rules ${DESTDIR}/etc/udev/rules.d/60-persistent-input.rules
 	install -m ${RULESMODE} 90-user.rules ${DESTDIR}/etc/udev/rules.d/90-user.rules
 	install -m ${RULESMODE} 95-debug.rules ${DESTDIR}/etc/udev/rules.d/95-debug.rules
 
@@ -29,7 +30,6 @@
 scripts:
 	install -m ${SCRIPTMODE} load_floppy_module.sh ${DESTDIR}/lib/udev/load_floppy_module.sh
 	install -m ${SCRIPTMODE} check-cdrom.sh ${DESTDIR}/lib/udev/check-cdrom.sh
-	install -m ${SCRIPTMODE} input.sh ${DESTDIR}/lib/udev/input.sh
 
 boot:
 	install -d ${DESTDIR}/usr/share/udev

Deleted: trunk/udev/input.sh
===================================================================
--- trunk/udev/input.sh	2006-02-14 09:05:26 UTC (rev 1178)
+++ trunk/udev/input.sh	2006-02-15 03:52:37 UTC (rev 1179)
@@ -1,217 +0,0 @@
-#!/bin/sh
-########################################################################
-#
-# Description : Input devices
-#
-# Authors     : Based on Open Suse Udev Rules
-#               kay.sievers at suse.de
-#
-# Adapted to  : Jim Gifford
-# LFS
-#
-# Version     : 00.00
-#
-# Notes       :
-#
-########################################################################
-
-input_join_words() {
-    local array="$1" tmp
-    [ "$array" ] || return 0
-
-    set $array
-    tmp="$1"
-    shift
-    while [ "$#" -gt 0 ]; do
-	tmp="$tmp:$1"
-	shift
-    done
-
-    echo "$tmp"
-}
-
-input_convert_vars() {
-    i_bustype=0; i_vendor=0; i_product=0; i_version=0; i_evBits=0
-
-    if [ "$PRODUCT" ]; then
-	set -- $(IFS='/'; echo $PRODUCT '')
-	i_bustype=$((0x$1))
-	i_vendor=$((0x$2))
-	i_product=$((0x$3))
-	[ "$4" ] && i_version=$((0x$4)) # XXX
-    fi
-
-    [ "$EV" ] && i_evBits=$((0x$EV))
-
-    i_keyBits=$(input_join_words "$KEY")
-    i_relBits=$(input_join_words "$REL")
-    i_absBits=$(input_join_words "$ABS")
-    i_mscBits=$(input_join_words "$MSC")
-    i_ledBits=$(input_join_words "$LED")
-    i_sndBits=$(input_join_words "$SND")
-    i_ffBits=$( input_join_words "$FF")
-}
-
-input_match_bits() {
-    local mod_bits="$1" dev_bits="$2"
-    [ "$dev_bits" ] || return 0
-
-    local mword dword
-    mword=$((0x${mod_bits##*:}))
-    dword=$((0x${dev_bits##*:}))
-
-    while true; do
-	if [ $(( $mword & $dword != $mword )) -eq 1 ]; then
-	    return 1
-	fi
-
-	mod_bits=${mod_bits%:*}
-	dev_bits=${dev_bits%:*}
-
-	case "$mod_bits-$dev_bits" in
-	    *:*-*:*)		continue ;;
-	    *:*-*|*-*:*)	return 0 ;;
-	    *)			return 1 ;;
-	esac
-    done
-}
-
-load_drivers() {
-    local TYPE="$1" FILENAME="$2"
-
-    ${TYPE}_map_modules < $FILENAME
-
-    for MODULE in $DRIVERS; do
-	/sbin/modprobe $MODULE || true
-    done
-}
-
-input_map_modules() {
-    local line module
-    local relBits mscBits ledBits sndBits keyBits absBits ffBits
-
-    while read line; do
-	# comments are lines that start with "#" ...
-	# be careful, they still get parsed by bash!
-	case "$line" in
-	\#*) continue ;;
-	esac
-
-	set $line
-
-	module="$1"
-	matchBits=$(($2))
-
-	bustype=$(($3))
-	vendor=$(($4))
-	product=$(($5))
-	version=$(($6))
-
-	evBits="$7"
-	keyBits="$8"
-	relBits="$9"
-
-	shift 9
-	absBits="$1"
-	cbsBits="$2"
-	ledBits="$3"
-	sndBits="$4"
-	ffBits="$5"
-	driverInfo=$(($6))
-
-	if [ $INPUT_DEVICE_ID_MATCH_BUS -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_BUS )) ] && 
-		[ $bustype -ne $i_bustype ]; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_VENDOR -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_VENDOR )) ] && 
-		[ $vendor -ne $i_vendor ]; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_PRODUCT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_PRODUCT )) ] && 
-		[ $product -ne $i_product ]; then
-	    continue
-	fi
-
-	# version i_version $i_version < version $version
-	if [ $INPUT_DEVICE_ID_MATCH_VERSION -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_VERSION )) ] && 
-		[ $version -ge $i_version ]; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_EVBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_EVBIT )) ] && 
-		input_match_bits "$evBits" "$i_evBits"; then
-	    continue
-	fi
-	if [ $INPUT_DEVICE_ID_MATCH_KEYBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_KEYBIT )) ] && 
-		input_match_bits "$keyBits" "$i_keyBits"; then
-	    continue
-	fi
-	if [ $INPUT_DEVICE_ID_MATCH_RELBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_RELBIT )) ] && 
-		input_match_bits "$relBits" "$i_relBits"; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_ABSBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_ABSBIT )) ] && 
-		input_match_bits "$absBits" "$i_absBits"; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_MSCBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_MSCBIT )) ] && 
-		input_match_bits "$mscBits" "$i_mscBits"; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_LEDBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_LEDBIT )) ] && 
-		input_match_bits "$ledBits" "$i_ledBits"; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_SNDBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_SNDBIT )) ] && 
-		input_match_bits "$sndBits" "$i_sndBits"; then
-	    continue
-	fi
-
-	if [ $INPUT_DEVICE_ID_MATCH_FFBIT -eq $(( $matchBits & $INPUT_DEVICE_ID_MATCH_FFBIT )) ] && 
-		input_match_bits "$ffBits" "$i_ffBits"; then
-	    continue
-	fi
-
-	if [ $matchBits -eq 0 -a $driverInfo -eq 0 ]; then
-		continue
-	fi
-
-	# It was a match!
-	case " $DRIVERS " in
-	    *" $module "*)
-		: already found
-	    ;;
-	    *)
-		DRIVERS="$module $DRIVERS"
-	    ;;
-	esac
-
-    done
-}
-
-INPUT_DEVICE_ID_MATCH_BUS=1
-INPUT_DEVICE_ID_MATCH_VENDOR=2
-INPUT_DEVICE_ID_MATCH_PRODUCT=4
-INPUT_DEVICE_ID_MATCH_VERSION=8
-INPUT_DEVICE_ID_MATCH_EVBIT=$((0x010))
-INPUT_DEVICE_ID_MATCH_KEYBIT=$((0x020))
-INPUT_DEVICE_ID_MATCH_RELBIT=$((0x040))
-INPUT_DEVICE_ID_MATCH_ABSBIT=$((0x080))
-INPUT_DEVICE_ID_MATCH_MSCBIT=$((0x100))
-INPUT_DEVICE_ID_MATCH_LEDBIT=$((0x200))
-INPUT_DEVICE_ID_MATCH_SNDBIT=$((0x400))
-INPUT_DEVICE_ID_MATCH_FFBIT=$((0x800))
-
-MAP_CURRENT="/lib/modules/$(uname -r)/modules.inputmap"
-[ -r $MAP_CURRENT ] || exit 0
-
-input_convert_vars
-load_drivers input $MAP_CURRENT
-
-exit 0

Modified: trunk/udev/show_event_log
===================================================================
--- trunk/udev/show_event_log	2006-02-14 09:05:26 UTC (rev 1178)
+++ trunk/udev/show_event_log	2006-02-15 03:52:37 UTC (rev 1179)
@@ -15,21 +15,25 @@
 #
 ########################################################################
 #
+# extract udev log messages from a syslog file
+# show_event_log <first> [<last> [<list of event types>] ]
+#
 # known events are:
-# ac97 acpi block cpu drivers edd firmware graphics i2c-adapter i8259
-# ieee1394_protocol input ioapic irqrouter lapic mem misc module namespace
-# pci_bus pci_express pcmcia pcmcia_socket platform pnp printer scsi scsi_host
-# serio sound timer timer_pit tty usb usb_device usb_host vc
+#   ac97 acpi block cpu drivers edd firmware graphics i2c-adapter i8259
+#   ieee1394_protocol input ioapic irqrouter lapic mem misc module namespace
+#   pci_bus pci_express pcmcia pcmcia_socket platform pnp printer scsi scsi_host
+#   serio sound timer timer_pit tty usb usb_device usb_host vc
 #
+# GPL, version 2
+# Christian Zoz <zoz at suse.de>
+#
+
 EXCLUDE_SUBS="acpi cpu edd mem namespace pci_bus tty vc"
-# EXCLUDE_SUBS="ac97 acpi cpu drivers edd graphics i2c-adapter mem i8259 ioapic irqrouter lapic mem module namespace platform pnp pci_bus tty vc"
 MESSAGES=${MESSAGES:-/var/log/messages}
-#grep udevd /var/log/messages | grep -v "pass_env\|geventrec\|hal.hot\|received"
 
 show_event() {
 	local SN PID SUBS
 	declare -i SN=$1 PID
-#	read PID ACT SUBS < <(sed -n "s/^.*seq $SN forked, pid \[\([0-9]*\)\], \([^,]*\),.*$/\1 \2/p;T;q" $MESSAGES)
 	read PID ACT SUBS < <(sed -n "s/^.*seq $SN forked, pid \[\([0-9]*\)\], '\([^']*\)' '\([^']*\)'.*$/\1 \2 \3/p;T;q" $MESSAGES)
 	if [ $PID == 0 ] ; then
 		echo event $SN not found 1>&2
@@ -56,7 +60,8 @@
 
 declare -i START=$1 STOP=$2
 if [ "$2" == last ] ; then
-	read STOP < <(grep -o "udev_done.*exit" $MESSAGES | cut -d" " -f3 | sort -n | tail -1)
+	read STOP_STRING < <(grep -o "udev_done.*exit" $MESSAGES | cut -d" " -f3 | sort -n | tail -1)
+	STOP=`echo $STOP_STRING | sed 's/^[^0-9]*\([0-9]\+\).*$/\1/'`
 fi
 test $START -lt 0 -a $STOP -gt 0 && START=$((STOP+START+1))
 test $START -gt $STOP && STOP=$START
@@ -64,7 +69,7 @@
 for n in `seq $START $STOP`; do
 	show_event $n
 done
-	
+
 exit
 
 # list all events




More information about the cross-lfs mailing list