From: ulan@chromium.org Date: Tue, 2 Apr 2013 12:20:50 +0000 (+0000) Subject: ARM: Log an error if /proc/cpuinfo cannot be opened X-Git-Tag: upstream/4.7.83~14725 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fed279a5535e87635e70cffd44e4b2f86b97660a;p=platform%2Fupstream%2Fv8.git ARM: Log an error if /proc/cpuinfo cannot be opened This will make it easier to see if the current CPU feature detection starts breaking because of process sandboxing. BUG=v8:2597 Review URL: https://chromiumcodereview.appspot.com/13465003 Patch from Hans Wennborg . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/platform-linux.cc b/src/platform-linux.cc index d21f160..1f9cde1 100644 --- a/src/platform-linux.cc +++ b/src/platform-linux.cc @@ -111,8 +111,10 @@ static bool CPUInfoContainsString(const char * search_string) { 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))) {