OLD | NEW |
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 "nacl_io/kernel_intercept.h" | 5 #include "nacl_io/kernel_intercept.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 const void* data) { | 214 const void* data) { |
215 ON_NOSYS_RETURN(-1); | 215 ON_NOSYS_RETURN(-1); |
216 return s_state.kp->mount(source, target, filesystemtype, mountflags, data); | 216 return s_state.kp->mount(source, target, filesystemtype, mountflags, data); |
217 } | 217 } |
218 | 218 |
219 int ki_umount(const char* path) { | 219 int ki_umount(const char* path) { |
220 ON_NOSYS_RETURN(-1); | 220 ON_NOSYS_RETURN(-1); |
221 return s_state.kp->umount(path); | 221 return s_state.kp->umount(path); |
222 } | 222 } |
223 | 223 |
224 int ki_open(const char* path, int oflag) { | 224 int ki_open(const char* path, int oflag, mode_t mode) { |
225 ON_NOSYS_RETURN(-1); | 225 ON_NOSYS_RETURN(-1); |
226 return s_state.kp->open(path, oflag); | 226 return s_state.kp->open(path, oflag, mode); |
227 } | 227 } |
228 | 228 |
229 int ki_pipe(int pipefds[2]) { | 229 int ki_pipe(int pipefds[2]) { |
230 ON_NOSYS_RETURN(-1); | 230 ON_NOSYS_RETURN(-1); |
231 return s_state.kp->pipe(pipefds); | 231 return s_state.kp->pipe(pipefds); |
232 } | 232 } |
233 | 233 |
234 ssize_t ki_read(int fd, void* buf, size_t nbyte) { | 234 ssize_t ki_read(int fd, void* buf, size_t nbyte) { |
235 ON_NOSYS_RETURN(-1); | 235 ON_NOSYS_RETURN(-1); |
236 return s_state.kp->read(fd, buf, nbyte); | 236 return s_state.kp->read(fd, buf, nbyte); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 int ki_socket(int domain, int type, int protocol) { | 583 int ki_socket(int domain, int type, int protocol) { |
584 ON_NOSYS_RETURN(-1); | 584 ON_NOSYS_RETURN(-1); |
585 return s_state.kp->socket(domain, type, protocol); | 585 return s_state.kp->socket(domain, type, protocol); |
586 } | 586 } |
587 | 587 |
588 int ki_socketpair(int domain, int type, int protocol, int* sv) { | 588 int ki_socketpair(int domain, int type, int protocol, int* sv) { |
589 ON_NOSYS_RETURN(-1); | 589 ON_NOSYS_RETURN(-1); |
590 return s_state.kp->socketpair(domain, type, protocol, sv); | 590 return s_state.kp->socketpair(domain, type, protocol, sv); |
591 } | 591 } |
592 #endif // PROVIDES_SOCKET_API | 592 #endif // PROVIDES_SOCKET_API |
OLD | NEW |