1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

mtr: handle the case of existing but unreadable /proc/cpuinfo

This commit is contained in:
Sergei Golubchik
2023-05-31 14:40:17 +02:00
parent d14c485e1c
commit aca641da28

View File

@ -68,7 +68,7 @@ sub _cpuinfo {
} }
} }
$F= undef; # Close file $F= undef; # Close file
return $self; return $self->{cpus};
} }
@ -95,12 +95,7 @@ sub _kstat {
push(@{$self->{cpus}}, $cpuinfo); push(@{$self->{cpus}}, $cpuinfo);
} }
# At least one cpu should have been found return $self->{cpus};
# if this method worked
if ( $self->{cpus} ) {
return $self;
}
return undef;
} }