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

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

Issue 1127103006: nacl_io: Add glibc IRT redirect for rename syscall (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/library.dsc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 // The entire file is wrapped in this #if. We do this so this .cc file can be 7 // The entire file is wrapped in this #if. We do this so this .cc file can be
8 // compiled, even on a non-glibc build. 8 // compiled, even on a non-glibc build.
9 #if defined(__native_client__) && defined(__GLIBC__) 9 #if defined(__native_client__) && defined(__GLIBC__)
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 \ 168 \
169 OP(chmod); \ 169 OP(chmod); \
170 OP(access); \ 170 OP(access); \
171 OP(unlink); \ 171 OP(unlink); \
172 OP(fchdir); \ 172 OP(fchdir); \
173 OP(fchmod); \ 173 OP(fchmod); \
174 OP(fsync); \ 174 OP(fsync); \
175 OP(fdatasync); \ 175 OP(fdatasync); \
176 OP(lstat); \ 176 OP(lstat); \
177 OP(link); \ 177 OP(link); \
178 OP(rename); \
178 OP(readlink); \ 179 OP(readlink); \
179 OP(utimes); 180 OP(utimes);
180 181
181 // TODO(bradnelson): Add these as well. 182 // TODO(bradnelson): Add these as well.
182 // OP(epoll_create); 183 // OP(epoll_create);
183 // OP(epoll_create1); 184 // OP(epoll_create1);
184 // OP(epoll_ctl); 185 // OP(epoll_ctl);
185 // OP(epoll_pwait); 186 // OP(epoll_pwait);
186 // OP(ppoll); 187 // OP(ppoll);
187 // OP(pselect); 188 // OP(pselect);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 int res = ki_lstat(pathname, &buf); 342 int res = ki_lstat(pathname, &buf);
342 RTN_ERRNO_IF(res < 0); 343 RTN_ERRNO_IF(res < 0);
343 stat_to_nacl_stat(&buf, nacl_buf); 344 stat_to_nacl_stat(&buf, nacl_buf);
344 return 0; 345 return 0;
345 } 346 }
346 347
347 int WRAP(link)(const char* pathname, const char* newpath) { 348 int WRAP(link)(const char* pathname, const char* newpath) {
348 ERRNO_RTN(ki_link(pathname, newpath)); 349 ERRNO_RTN(ki_link(pathname, newpath));
349 } 350 }
350 351
352 int WRAP(rename)(const char* pathname, const char* newpath) {
353 ERRNO_RTN(ki_rename(pathname, newpath));
354 }
355
351 int WRAP(readlink)(const char* pathname, 356 int WRAP(readlink)(const char* pathname,
352 char* buf, 357 char* buf,
353 size_t count, 358 size_t count,
354 size_t* nread) { 359 size_t* nread) {
355 int rtn = ki_readlink(pathname, buf, count); 360 int rtn = ki_readlink(pathname, buf, count);
356 RTN_ERRNO_IF(rtn < 0); 361 RTN_ERRNO_IF(rtn < 0);
357 *nread = rtn; 362 *nread = rtn;
358 return 0; 363 return 0;
359 } 364 }
360 365
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 if (s_wrapped) { 661 if (s_wrapped) {
657 LOG_TRACE("kernel_wrap_uninit"); 662 LOG_TRACE("kernel_wrap_uninit");
658 EXPAND_SYMBOL_LIST_OPERATION(USE_REAL) 663 EXPAND_SYMBOL_LIST_OPERATION(USE_REAL)
659 s_wrapped = false; 664 s_wrapped = false;
660 } 665 }
661 } 666 }
662 667
663 EXTERN_C_END 668 EXTERN_C_END
664 669
665 #endif // defined(__native_client__) && defined(__GLIBC__) 670 #endif // defined(__native_client__) && defined(__GLIBC__)
OLDNEW
« 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