scan_cifs: do not add NT_STATUS lines to result

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2020-07-01 10:25:07 +02:00
parent 67a2371180
commit c42d86559c
2 changed files with 3 additions and 3 deletions

View File

@ -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} };
}

View File

@ -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';
}
},
);