path_id: add platform and serio support

This commit is contained in:
Libor Klepac
2006-05-09 18:23:20 +02:00
committed by Kay Sievers
parent 674e00f67c
commit 5ac7a25e85
+56
View File
@@ -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=
;;