MIPS: ARM: Log an error if /proc/cpuinfo cannot be opened

Port r14112 (8cc5081c)

Original commit message:
This will make it easier to see if the current CPU feature detection
starts breaking because of process sandboxing.

BUG=

Review URL: https://codereview.chromium.org/13582007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
palfia@homejinni.com 2013-04-08 22:51:00 +00:00
parent 9559181b0e
commit 741ce3b1a2

View File

@ -269,8 +269,10 @@ bool OS::MipsCpuHasFeature(CpuFeature feature) {
FILE* f = NULL;
const char* what = search_string;
if (NULL == (f = fopen(file_name, "r")))
if (NULL == (f = fopen(file_name, "r"))) {
OS::PrintError("Failed to open /proc/cpuinfo\n");
return false;
}
int k;
while (EOF != (k = fgetc(f))) {