From 06c8186bd73c5e1231e020b3ad6adf5ab8720c5e Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Wed, 24 Apr 2024 12:46:17 +0200 Subject: [PATCH] nvme: use non-capturing group for 0x fixes issues on systems where namespace is not yet prefixed by 0x --- plugins/disk/nvme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/disk/nvme b/plugins/disk/nvme index fa58cdef..0caa80db 100755 --- a/plugins/disk/nvme +++ b/plugins/disk/nvme @@ -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,