]> granicus.if.org Git - zfs/commit
vdev_id: use mawk-compatible regular expression
authorNed Bass <bass6@llnl.gov>
Wed, 17 Dec 2014 19:01:42 +0000 (11:01 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Dec 2014 20:05:16 +0000 (12:05 -0800)
commit2d9d57b0fbe17b56a1bdd09505400144778cb189
treea42e270a445a7e59779f6596d7216d37dee24c48
parent5c7afad448325b5761601f574fc937476d3a77d1
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
cmd/vdev_id/vdev_id