nvme: use non-capturing group for 0x
fixes issues on systems where namespace is not yet prefixed by 0x
This commit is contained in:
parent
f165c625bf
commit
06c8186bd7
|
@ -89,7 +89,7 @@ None known.
|
|||
|
||||
=head1 VERSION
|
||||
|
||||
1.1
|
||||
1.2
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
|
@ -176,7 +176,7 @@ sub nvme_list {
|
|||
} elsif (m:^Node\s+Generic\s+SN\s+Model\s+Namespace\s+Usage\s+:) {
|
||||
# version 2 header
|
||||
++$recognised_output;
|
||||
} elsif (m:^(/\S+)\s+(/\S+)\s+(\S+)\s+(\S.*\S)\s{3,}((0x)?\d+)\s+(\S+\s+.B)\s+/\s+(\S+\s+.B):) {
|
||||
} elsif (m|^(/\S+)\s+(/\S+)\s+(\S+)\s+(\S.*\S)\s{3,}((?:0x)?\d+)\s+(\S+\s+.B)\s+/\s+(\S+\s+.B)|) {
|
||||
# version 2 data (first 2 columns start with /)
|
||||
$devices{'SN_'.$3} = {
|
||||
device => $1,
|
||||
|
|
Loading…
Reference in New Issue