]> git.proxmox.com Git - pve-storage.git/commitdiff
scan_cifs: do not add NT_STATUS lines to result
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 08:25:07 +0000 (10:25 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 10:11:59 +0000 (12:11 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/pvesm.pm
PVE/Storage.pm

index 8c86714fa4992386d17ca07dd2ea2f0ce069e8ce..c5e2d910c7d09035c4fbd7f0f7a64fa19dc3d499 100755 (executable)
@@ -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} };
        }
 
index 1de2bcb260dc0e69cdfffa6ee041eff86bd3f943..e04f2ac4343c8b7aadeb21ca21ee25a5459fc7f5 100755 (executable)
@@ -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';
            }
        },
     );