From 5ac7a25e85729cdac995fd28de48c55487be31c9 Mon Sep 17 00:00:00 2001 From: Libor Klepac Date: Tue, 9 May 2006 18:23:20 +0200 Subject: [PATCH] path_id: add platform and serio support --- extras/path_id/path_id | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/extras/path_id/path_id b/extras/path_id/path_id index 7f0d53a18..913c4909f 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= ;; -- 2.30.2