| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
| 3 * Use of this source code is governed by a BSD-style license that can be | |
| 4 * found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 #include <fcntl.h> | |
| 8 | |
| 9 #include "native_client/src/untrusted/irt/irt.h" | |
| 10 #include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h" | |
| 11 | |
| 12 static int nacl_irt_open_resource(const char *pathname, int *newfd) { | |
| 13 int rv = NACL_GC_WRAP_SYSCALL(NACL_SYSCALL(open)(pathname, O_RDONLY, 0)); | |
| 14 if (rv < 0) | |
| 15 return -rv; | |
| 16 *newfd = rv; | |
| 17 return 0; | |
| 18 } | |
| 19 | |
| 20 const struct nacl_irt_resource_open nacl_irt_resource_open = { | |
| 21 nacl_irt_open_resource, | |
| 22 }; | |
| OLD | NEW |