]> err.no Git - systemd/commitdiff
path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-'
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 26 Jun 2008 11:25:31 +0000 (13:25 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 26 Jun 2008 11:25:31 +0000 (13:25 +0200)
extras/path_id/path_id

index 7a37700289d89841a0d54367835592e4e50a48e4..0fad30cfb257d3468ce047efaf1776994be04f3c 100755 (executable)
@@ -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
 }