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

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

Issue 12194030: Rename mount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix whitespace Created 7 years, 10 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 | Annotate | Revision Log
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 5
6 #include <sys/types.h> // Include something that will define __GLIBC__. 6 #include <sys/types.h> // Include something that will define __GLIBC__.
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-glibc build. 9 // compiled, even on a non-glibc build.
10 #if defined(__native_client__) && defined(__GLIBC__) 10 #if defined(__native_client__) && defined(__GLIBC__)
11 11
12 #include "nacl_mounts/kernel_wrap.h" 12 #include "nacl_io/kernel_wrap.h"
13 #include <alloca.h> 13 #include <alloca.h>
14 #include <dirent.h> 14 #include <dirent.h>
15 #include <errno.h> 15 #include <errno.h>
16 #include <irt.h> 16 #include <irt.h>
17 #include <irt_syscalls.h> 17 #include <irt_syscalls.h>
18 #include <nacl_stat.h> 18 #include <nacl_stat.h>
19 #include <string.h> 19 #include <string.h>
20 #include <sys/stat.h> 20 #include <sys/stat.h>
21 #include "nacl_mounts/kernel_intercept.h" 21 #include "nacl_io/kernel_intercept.h"
22 22
23 23
24 namespace { 24 namespace {
25 25
26 void stat_to_nacl_stat(const struct stat* buf, nacl_abi_stat* nacl_buf) { 26 void stat_to_nacl_stat(const struct stat* buf, nacl_abi_stat* nacl_buf) {
27 memset(nacl_buf, 0, sizeof(struct nacl_abi_stat)); 27 memset(nacl_buf, 0, sizeof(struct nacl_abi_stat));
28 nacl_buf->nacl_abi_st_dev = buf->st_dev; 28 nacl_buf->nacl_abi_st_dev = buf->st_dev;
29 nacl_buf->nacl_abi_st_ino = buf->st_ino; 29 nacl_buf->nacl_abi_st_ino = buf->st_ino;
30 nacl_buf->nacl_abi_st_mode = buf->st_mode; 30 nacl_buf->nacl_abi_st_mode = buf->st_mode;
31 nacl_buf->nacl_abi_st_nlink = buf->st_nlink; 31 nacl_buf->nacl_abi_st_nlink = buf->st_nlink;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 DO_WRAP(seek); 290 DO_WRAP(seek);
291 DO_WRAP(stat); 291 DO_WRAP(stat);
292 DO_WRAP(write); 292 DO_WRAP(write);
293 } 293 }
294 } 294 }
295 295
296 EXTERN_C_END 296 EXTERN_C_END
297 297
298 298
299 #endif // defined(__native_client__) && defined(__GLIBC__) 299 #endif // defined(__native_client__) && defined(__GLIBC__)
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_wrap.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698