Merge pull request #1431 from ap-wtioit/master-fix_nvme_github

Fix nvme always reporting 0 usage.
This commit is contained in:
Kenyon Ralph 2024-04-29 17:17:32 -07:00 committed by GitHub
commit f9fe91b9c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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,