[pve-devel] applied: [PATCH storage 4/5] scan_cifs: do not add NT_STATUS lines to result
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jul 1 12:13:17 CEST 2020
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
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';
}
},
);
--
2.20.1
More information about the pve-devel
mailing list