Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc

Issue 756333005: [NaCl SDK] nacl_io: remove getcwd() implemenation (rely on glibc/newlib versions) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/library.dsc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc b/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
index 4d1e1b65ce5205fd071da0d61f5ccd032c67ed5f..394cea6f89e9c3c88a9b5d860737c455e81d029b 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
@@ -149,22 +149,7 @@ void ki_exit(int status) {
}
char* ki_getcwd(char* buf, size_t size) {
- // gtest uses getcwd in a static initializer and expects it to always
- // succeed. If we haven't initialized kernel-intercept yet, then try
- // the IRT's getcwd, and fall back to just returning ".".
- if (!ki_is_initialized()) {
- int rtn = _real_getcwd(buf, size);
- if (rtn != 0) {
- if (rtn == ENOSYS) {
- buf[0] = '.';
- buf[1] = 0;
- } else {
- errno = rtn;
- return NULL;
- }
- }
- return buf;
- }
+ ON_NOSYS_RETURN(NULL);
return s_state.kp->getcwd(buf, size);
}
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/library.dsc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698