rpms/udev/devel udev-095-path_id.patch,NONE,1.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Sep 25 15:08:46 UTC 2006


Author: harald

Update of /cvs/dist/rpms/udev/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20290

Added Files:
	udev-095-path_id.patch 
Log Message:


udev-095-path_id.patch:
 path_id |   53 +++++++++++++++++++++++++++++------------------------
 1 files changed, 29 insertions(+), 24 deletions(-)

--- NEW FILE udev-095-path_id.patch ---
--- udev-095/extras/path_id/path_id	2006-07-04 12:34:55.000000000 +0200
+++ udev-100/extras/path_id/path_id	2006-09-07 11:32:45.000000000 +0200
@@ -220,7 +220,7 @@
 }
 
 handle_firewire () {
-	:handle_firewire $*
+	: handle_firewire $*
 	local DEV=$1
 	if [ -f "$D/ieee1394_id" ] ; then
 		read ieee1394_id < $D/ieee1394_id
@@ -407,30 +407,35 @@
 
 handle_device () {
 	full_sysfs_path="$SYSFS$DEVPATH"
-	if [ -L $full_sysfs_path/subsystem ]; then
-		# new sysfs block layout
-		full_sysfs_path="${full_sysfs_path%/*}"
-		cd "$full_sysfs_path/subsystem";
-		subsys="`pwd -P`"
-		cd "$OPWD"
-		subsys="${subsys##*/}"
-		if [ "$subsys" = "block" ]; then
-			# parent is "block", it's a partition, move one up
-			full_sysfs_path="${full_sysfs_path%/*}"
-		fi
-		cd $full_sysfs_path
-	else
-		# old sysfs block layout
-		if [ ! -L $full_sysfs_path/device ] ; then
-			if [ -f $full_sysfs_path/range ] ; then return ; fi
-			full_sysfs_path="${full_sysfs_path%/*}"
-			: full_sysfs_path "$full_sysfs_path"
-			if [ ! -L $full_sysfs_path/device -o ! -f $full_sysfs_path/dev ] ; then
-				return
+	case "$DEVPATH" in
+		/devices/*)
+			# new sysfs layout
+			if [ -L $full_sysfs_path/subsystem ]; then
+				full_sysfs_path="${full_sysfs_path%/*}"
+				cd "$full_sysfs_path/subsystem";
+				subsys="`pwd -P`"
+				cd "$OPWD"
+				subsys="${subsys##*/}"
+				if [ "$subsys" = "block" ]; then
+					# parent is "block", it's a partition, move one up
+				full_sysfs_path="${full_sysfs_path%/*}"
+				fi
+				cd $full_sysfs_path
 			fi
-		fi
-		cd $full_sysfs_path/device
-	fi
+			;;
+		*)
+			# old sysfs layout
+			if [ ! -L $full_sysfs_path/device ] ; then
+				if [ -f $full_sysfs_path/range ] ; then return ; fi
+				full_sysfs_path="${full_sysfs_path%/*}"
+				: full_sysfs_path "$full_sysfs_path"
+				if [ ! -L $full_sysfs_path/device -o ! -f $full_sysfs_path/dev ] ; then
+					return
+				fi
+			fi
+			cd $full_sysfs_path/device
+			;;
+	esac
 	full_sysfs_device_path="`pwd -P`"
 	cd "$OPWD"
 	D=$full_sysfs_device_path




More information about the fedora-cvs-commits mailing list