Skip to content
Permalink
Browse files

ZTS: Fix is_physical_device on FreeBSD

This should have been using egrep.

Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
  • Loading branch information
freqlabs committed Jan 13, 2020
1 parent 61152d1 commit 48d9f312e8fb58ef907a4c4f9867f6feea136b6d
Showing with 7 additions and 8 deletions.
  1. +7 −8 tests/zfs-tests/include/blkdev.shlib
@@ -98,14 +98,13 @@ function is_physical_device #device
return $?
elif is_freebsd; then
is_disk_device "$DEV_DSKDIR/$device" && \
echo $device | grep -q \
-e '^a?da[0-9]+$' \
-e '^md[0-9]+$' \
-e '^mfid[0-9]+$' \
-e '^nda[0-9]+$' \
-e '^nvd[0-9]+$' \
-e '^vtbd[0-9]+$' \
> /dev/null 2>&1
echo $device | egrep -q \
-e '^a?da[0-9]+$' \
-e '^md[0-9]+$' \
-e '^mfid[0-9]+$' \
-e '^nda[0-9]+$' \
-e '^nvd[0-9]+$' \
-e '^vtbd[0-9]+$'
return $?
else
echo $device | egrep "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1

0 comments on commit 48d9f31

Please sign in to comment.
You can’t perform that action at this time.