diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-06-26 13:25:31 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-06-26 13:25:31 +0200 |
commit | dad1f0924be4ccd7e09ac59237b05ccc354ceb1d (patch) | |
tree | 1d14ccf8ee8c4a8bad1a136c2325b3ba600a0d00 /extras/path_id | |
parent | 7c389ce8a098fa02c93890205d715ecef6024c3e (diff) |
path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-'
Diffstat (limited to 'extras/path_id')
-rwxr-xr-x | extras/path_id/path_id | 6 |
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 } |