HomeFreeBSD

vdev_id: use mawk-compatible regular expression

Description

vdev_id: use mawk-compatible regular expression

Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk'
alternative. A regular expression in map_slot() contains an unquoted
empty string following the alternation (|) operator, which results in an
"missing operand" error with mawk. The solution is to rearrange the
expression so the alternation has two operands.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/pkg-zfs#136
Closes zfsonlinux/zfs#2965

Details

Provenance
Ned Bass <bass6@llnl.gov>Authored on Dec 17 2014, 7:01 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 19 2014, 8:05 PM
Parents
rG5c7afad44832: Fix cstyle issue from c66989b
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG2d9d57b0fbe1: vdev_id: use mawk-compatible regular expression (authored by Ned Bass <bass6@llnl.gov>).Dec 19 2014, 8:05 PM