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:
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user