From c42d86559c2e143cd2eadecb44770a8ccf7c26bd Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 1 Jul 2020 10:25:07 +0200 Subject: [PATCH] scan_cifs: do not add NT_STATUS lines to result Signed-off-by: Thomas Lamprecht --- PVE/CLI/pvesm.pm | 1 - PVE/Storage.pm | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index 8c86714..c5e2d91 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -504,7 +504,6 @@ __PACKAGE__->register_method ({ my $data = []; foreach my $k (keys %$res) { - next if $k =~ m/NT_STATUS_/; push @$data, { share => $k, description => $res->{$k} }; } diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 1de2bcb..e04f2ac 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1213,8 +1213,9 @@ sub scan_cifs { my $line = shift; if ($line =~ m/(\S+)\s*Disk\s*(\S*)/) { $res->{$1} = $2; - } elsif ($line =~ m/(NT_STATUS_(\S*))/) { - $res->{$1} = ''; + } elsif ($line =~ m/(NT_STATUS_(\S+))/) { + my $status = $1; + $err .= "unexpected status: $1\n" if uc($1) ne 'SUCCESS'; } }, );