(plugin) os::aix::local - mode list-storages fix parsing with a ssh banner (#4088)

This commit is contained in:
qgarnier 2022-12-05 14:49:44 +00:00 committed by GitHub
parent 92a928be9c
commit ed1db76094
2 changed files with 2 additions and 3 deletions

View File

@ -56,7 +56,7 @@ sub manage_selection {
# Header not needed
shift @lines;
foreach my $line (@lines) {
next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
next if ($line !~ /^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)/);
my ($fs, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6);
if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&

View File

@ -117,7 +117,7 @@ sub manage_selection {
# Header not needed
shift @lines;
foreach my $line (@lines) {
next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
next if ($line !~ /^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)/);
my ($fs, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6);
next if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
@ -125,7 +125,6 @@ sub manage_selection {
next if (defined($self->{option_results}->{filter_mount}) && $self->{option_results}->{filter_mount} ne '' &&
$mount !~ /$self->{option_results}->{filter_mount}/);
next if ($size !~ /^\d+$/ || $used !~ /^\d+$/ || $available !~ /^\d+$/);
next if ($size == 0);
$size = $size * 1024;