summaryrefslogtreecommitdiff
path: root/test/test.block
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.block')
-rw-r--r--test/test.block5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test.block b/test/test.block
index 622a66037f..b806a42aac 100644
--- a/test/test.block
+++ b/test/test.block
@@ -16,14 +16,13 @@ export ACTION=$1 # 'add' or 'remove'
for i in ${SYSFSDIR}/block/*; do
# add each drive
- export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
+ export DEVPATH=${i#${SYSFSDIR}}
$BIN block
# add each partition, on each device
for j in $i/*; do
if [ -f $j/dev ]; then
- export DEVPATH="/"`echo $j | \
- cut --delimiter='/' --fields=3-`
+ export DEVPATH=${j#${SYSFSDIR}}
$BIN block
fi
done