diff options
Diffstat (limited to 'tests/zfs-tests/include/libtest.shlib')
-rw-r--r-- | tests/zfs-tests/include/libtest.shlib | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 4ad3ee9bf..ac9ff6183 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -914,14 +914,15 @@ function set_partition typeset -i slicenum=$1 typeset start=$2 typeset size=$3 - typeset disk=$4 + typeset disk=${4#$DEV_DSKDIR/} + disk=${disk#$DEV_RDSKDIR/} case "$(uname)" in Linux) if [[ -z $size || -z $disk ]]; then log_fail "The size or disk name is unspecified." fi - [[ -n $DEV_DSKDIR ]] && disk=$DEV_DSKDIR/$disk + disk=$DEV_DSKDIR/$disk typeset size_mb=${size%%[mMgG]} size_mb=${size_mb%%[mMgG][bB]} @@ -969,7 +970,7 @@ function set_partition if [[ -z $size || -z $disk ]]; then log_fail "The size or disk name is unspecified." fi - [[ -n $DEV_DSKDIR ]] && disk=$DEV_DSKDIR/$disk + disk=$DEV_DSKDIR/$disk if [[ $slicenum -eq 0 ]] || ! gpart show $disk >/dev/null 2>&1; then gpart destroy -F $disk >/dev/null 2>&1 |