aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibor Klepac <libor.klepac@bcom.cz>2006-05-09 18:23:20 +0200
committerKay Sievers <kay.sievers@suse.de>2006-05-09 18:23:20 +0200
commit5ac7a25e85729cdac995fd28de48c55487be31c9 (patch)
treebf236735a17364008aca7b577b0f076126a2f83b
parent674e00f67c5dc4bd6e7c5aff21c11b36eb81cd75 (diff)
downloadudev-5ac7a25e85729cdac995fd28de48c55487be31c9.tar.gz
path_id: add platform and serio support
-rw-r--r--extras/path_id/path_id56
1 files changed, 56 insertions, 0 deletions
diff --git a/extras/path_id/path_id b/extras/path_id/path_id
index 7f0d53a1..913c4909 100644
--- a/extras/path_id/path_id
+++ b/extras/path_id/path_id
@@ -96,6 +96,56 @@ handle_pci () {
RESULT=0
}
+handle_platform () {
+ local DEV=$1
+ cd -P $1
+ DEV=${PWD}
+ platform_id=${DEV##*/}
+ host_dev_path=$DEV
+ while [ ! -z "$host_dev_path" ] ; do
+ case "$host_dev_path" in
+ */platform*)
+ host_dev_path=${host_dev_path%/*}
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+ if [ "$d" ]; then
+ d="platform-$platform_id-$d"
+ else
+ d="platform-$platform_id"
+ fi
+ D="$host_dev_path"
+ RESULT=0
+}
+
+handle_serio () {
+ local DEV=$1
+ cd -P $1
+ DEV=${PWD}
+ serio_id=${DEV##*/serio}
+ host_dev_path=$DEV
+ while [ ! -z "$host_dev_path" ] ; do
+ case "$host_dev_path" in
+ */serio*)
+ host_dev_path=${host_dev_path%/*}
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+ if [ "$d" ]; then
+ d="serio-$serio_id-$d"
+ else
+ d="serio-$serio_id"
+ fi
+ D="$host_dev_path"
+ RESULT=0
+}
+
handle_ide () {
: handle_ide $*
local DEV=$1
@@ -372,6 +422,12 @@ handle_device () {
*/pci[0-9]*:[0-9]*)
handle_pci "$D"
;;
+ */serio[0-9]*)
+ handle_serio "$D"
+ ;;
+ */platform/*)
+ handle_platform "$D"
+ ;;
*/devices)
D=
;;