mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
path_id: support identification of Xen virtual block devices
This commit is contained in:
parent
e2151b00e9
commit
09b2999210
@ -129,6 +129,30 @@ handle_platform () {
|
||||
RESULT=0
|
||||
}
|
||||
|
||||
handle_xen () {
|
||||
local DEV=$1
|
||||
cd -P $1
|
||||
vbd_id=${DEV##*/}
|
||||
host_dev_path=$DEV
|
||||
while [ ! -z "$host_dev_path" ] ; do
|
||||
case "$host_dev_path" in
|
||||
*/vbd*)
|
||||
host_dev_path=${host_dev_path%/*}
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ "$d" ]; then
|
||||
d="xen-$vbd_id-$d"
|
||||
else
|
||||
d="xen-$vbd_id"
|
||||
fi
|
||||
D="$host_dev_path"
|
||||
RESULT=0
|
||||
}
|
||||
|
||||
handle_serio () {
|
||||
local DEV=$1
|
||||
cd -P $1
|
||||
@ -532,6 +556,9 @@ handle_device () {
|
||||
*/platform/*)
|
||||
handle_platform "$D"
|
||||
;;
|
||||
*/vbd-[0-9]*)
|
||||
handle_xen "$D"
|
||||
;;
|
||||
*/devices)
|
||||
D=
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user