From dad1f0924be4ccd7e09ac59237b05ccc354ceb1d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 26 Jun 2008 13:25:31 +0200 Subject: [PATCH] path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-' --- extras/path_id/path_id | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extras/path_id/path_id b/extras/path_id/path_id index 7a377002..0fad30cf 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 } -- 2.39.5