summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-06-26 13:25:31 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-06-26 13:25:31 +0200
commitdad1f0924be4ccd7e09ac59237b05ccc354ceb1d (patch)
tree1d14ccf8ee8c4a8bad1a136c2325b3ba600a0d00 /extras
parent7c389ce8a098fa02c93890205d715ecef6024c3e (diff)
path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-'
Diffstat (limited to 'extras')
-rwxr-xr-xextras/path_id/path_id6
1 files changed, 5 insertions, 1 deletions
diff --git a/extras/path_id/path_id b/extras/path_id/path_id
index 7a37700289..0fad30cfb2 100755
--- a/extras/path_id/path_id
+++ b/extras/path_id/path_id
@@ -95,7 +95,11 @@ handle_pci () {
;;
esac
done
- d="pci-$pci_id-$d"
+ if [ "$d" ]; then
+ d="pci-$pci_id-$d"
+ else
+ d="pci-$pci_id"
+ fi
D="$host_dev_path"
RESULT=0
}