common/rc: handle option with argument in _require_xfs_io_command()
[xfstests-dev.git] / common / rc
index b4a77a2187f4f87796e388428e6d3971e33faff0..0306e93cb1caaf6ba5abf92d0f765a62f1c0786d 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2248,7 +2248,7 @@ _require_xfs_io_command()
        [ -n "$param" ] || return
 
        if [ -z "$param_checked" ]; then
-               $XFS_IO_PROG -c "help $command" | grep -q "^ $param --" || \
+               $XFS_IO_PROG -c "help $command" | grep -E -q "^ $param ([a-zA-Z_]+ )?--" || \
                        _notrun "xfs_io $command doesn't support $param"
        else
                # xfs_io could result in "command %c not supported" if it was