chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
volume_id: fail on undefined __BYTE_ORDER
[elogind.git]
/
extras
/
path_id
/
path_id
diff --git
a/extras/path_id/path_id
b/extras/path_id/path_id
index a3a627e40794b00060af690a69656be3fab15b33..0fad30cfb257d3468ce047efaf1776994be04f3c 100755
(executable)
--- a/
extras/path_id/path_id
+++ b/
extras/path_id/path_id
@@
-95,7
+95,11
@@
handle_pci () {
;;
esac
done
;;
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
}
D="$host_dev_path"
RESULT=0
}
@@
-549,7
+553,7
@@
handle_device () {
;;
*)
mode=""
;;
*)
mode=""
- ;;
+
;;
esac
if [ "$d" ]; then
d="$d-${rewind}st${mode}"
esac
if [ "$d" ]; then
d="$d-${rewind}st${mode}"
@@
-557,22
+561,9
@@
handle_device () {
fi
}
fi
}
-case "$TYPE" in
- block)
- handle_device
- echo "ID_PATH=$d"
- ;;
- scsi_tape)
- handle_device
- echo "ID_PATH=$d"
- ;;
- input)
- handle_device
- echo "ID_PATH=$d"
- ;;
- *)
- RESULT=1
- ;;
-esac
-
-exit $RESULT
+handle_device
+if [ -z "$d" ]; then
+ exit 1
+fi
+echo "ID_PATH=$d"
+exit 0