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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc

Issue 832413004: [NaCl SDK] nacl_io: Change default root filesystem type from passthroughfs to memfs Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_path
Patch Set: Created 5 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sys/types.h> // Include something that will define __GLIBC__. 5 #include <sys/types.h> // Include something that will define __GLIBC__.
6 #include "nacl_io/kernel_wrap.h" // IRT_EXT is turned on in this header. 6 #include "nacl_io/kernel_wrap.h" // IRT_EXT is turned on in this header.
7 7
8 // The entire file is wrapped in this #if. We do this so this .cc file can be 8 // The entire file is wrapped in this #if. We do this so this .cc file can be
9 // compiled, even on a non-newlib build. 9 // compiled, even on a non-newlib build.
10 #if !defined(NACL_IO_IRT_EXT) && defined(__native_client__) && \ 10 #if !defined(NACL_IO_IRT_EXT) && defined(__native_client__) && \
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 CHECK_REAL(isatty); 297 CHECK_REAL(isatty);
298 // The real isatty function can be NULL (for example if we are running 298 // The real isatty function can be NULL (for example if we are running
299 // withing chrome). 299 // withing chrome).
300 if (REAL(isatty) == NULL) { 300 if (REAL(isatty) == NULL) {
301 *result = 0; 301 *result = 0;
302 return ENOTTY; 302 return ENOTTY;
303 } 303 }
304 return REAL(isatty)(fd, result); 304 return REAL(isatty)(fd, result);
305 } 305 }
306 306
307 int _real_getdents(int fd, void* nacl_buf, size_t nacl_count, size_t* nread) { 307 int _real_getdents(int fd, struct dirent* buf, size_t count, size_t* nread) {
308 CHECK_REAL(getdents); 308 CHECK_REAL(getdents);
309 return REAL(getdents)(fd, static_cast<dirent*>(nacl_buf), nacl_count, nread); 309 return REAL(getdents)(fd, buf, count, nread);
310 } 310 }
311 311
312 int _real_lseek(int fd, off_t offset, int whence, off_t* new_offset) { 312 int _real_lseek(int fd, off_t offset, int whence, off_t* new_offset) {
313 CHECK_REAL(seek); 313 CHECK_REAL(seek);
314 return REAL(seek)(fd, offset, whence, new_offset); 314 return REAL(seek)(fd, offset, whence, new_offset);
315 } 315 }
316 316
317 int _real_mkdir(const char* pathname, mode_t mode) { 317 int _real_mkdir(const char* pathname, mode_t mode) {
318 CHECK_REAL(mkdir); 318 CHECK_REAL(mkdir);
319 return REAL(mkdir)(pathname, mode); 319 return REAL(mkdir)(pathname, mode);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if (s_wrapped) { 378 if (s_wrapped) {
379 LOG_TRACE("kernel_wrap_uninit"); 379 LOG_TRACE("kernel_wrap_uninit");
380 EXPAND_SYMBOL_LIST_OPERATION(USE_REAL) 380 EXPAND_SYMBOL_LIST_OPERATION(USE_REAL)
381 s_wrapped = false; 381 s_wrapped = false;
382 } 382 }
383 } 383 }
384 384
385 EXTERN_C_END 385 EXTERN_C_END
386 386
387 #endif // defined(__native_client__) && !defined(__GLIBC__) ... 387 #endif // defined(__native_client__) && !defined(__GLIBC__) ...
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698