From: Bart Van Assche Date: Fri, 11 Jan 2019 18:43:33 +0000 (-0800) Subject: common/multipath-over-rdma: Fix held_by() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9c72519ffa54902698990863ce6477328e5c2bb9;p=users%2Fhch%2Fblktests.git common/multipath-over-rdma: Fix held_by() Use the proper shell operator to remove the /dev/ prefix from a device path. Fixes: a7f15d1141e4 ("Add tests for the SRP initiator and target drivers") Signed-off-by: Bart Van Assche --- diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma index 308c9b5..8583b58 100644 --- a/common/multipath-over-rdma +++ b/common/multipath-over-rdma @@ -88,7 +88,7 @@ held_by() { while [ -L "$dev" ]; do dev=$(realpath "$dev") done - dev=${dev%/dev/} + dev=${dev#/dev/} for d in /sys/class/block/*/holders/*; do [ -e "$d" ] || continue e=$(basename "$d")