Commit aca641da authored by Sergei Golubchik's avatar Sergei Golubchik

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

parent d14c485e
......@@ -68,7 +68,7 @@ sub _cpuinfo {
}
}
$F= undef; # Close file
return $self;
return $self->{cpus};
}
......@@ -95,12 +95,7 @@ sub _kstat {
push(@{$self->{cpus}}, $cpuinfo);
}
# At least one cpu should have been found
# if this method worked
if ( $self->{cpus} ) {
return $self;
}
return undef;
return $self->{cpus};
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment