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_proxy.h" | 5 #include "nacl_io/kernel_proxy.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <pthread.h> | 10 #include <pthread.h> |
11 #include <string.h> | 11 #include <string.h> |
12 #include <iterator> | 12 #include <iterator> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "nacl_io/kernel_handle.h" | 15 #include "nacl_io/kernel_handle.h" |
16 #include "nacl_io/kernel_wrap_real.h" | 16 #include "nacl_io/kernel_wrap_real.h" |
17 #include "nacl_io/mount.h" | 17 #include "nacl_io/mount.h" |
18 #include "nacl_io/mount_dev.h" | 18 #include "nacl_io/mount_dev.h" |
19 #include "nacl_io/mount_html5fs.h" | 19 #include "nacl_io/mount_html5fs.h" |
20 #include "nacl_io/mount_http.h" | 20 #include "nacl_io/mount_http.h" |
21 #include "nacl_io/mount_mem.h" | 21 #include "nacl_io/mount_mem.h" |
22 #include "nacl_io/mount_node.h" | 22 #include "nacl_io/mount_node.h" |
23 #include "nacl_io/mount_passthrough.h" | 23 #include "nacl_io/mount_passthrough.h" |
24 #include "nacl_io/osmman.h" | 24 #include "nacl_io/osmman.h" |
25 #include "nacl_io/osstat.h" | 25 #include "nacl_io/osstat.h" |
26 #include "nacl_io/path.h" | 26 #include "nacl_io/path.h" |
27 #include "nacl_io/pepper_interface.h" | 27 #include "nacl_io/pepper_interface.h" |
28 #include "utils/auto_lock.h" | 28 #include "sdk_util/auto_lock.h" |
29 #include "utils/ref_object.h" | 29 #include "sdk_util/ref_object.h" |
30 | 30 |
31 #ifndef MAXPATHLEN | 31 #ifndef MAXPATHLEN |
32 #define MAXPATHLEN 256 | 32 #define MAXPATHLEN 256 |
33 #endif | 33 #endif |
34 | 34 |
35 // TODO(noelallen) : Grab/Redefine these in the kernel object once available. | 35 // TODO(noelallen) : Grab/Redefine these in the kernel object once available. |
36 #define USR_ID 1002 | 36 #define USR_ID 1002 |
37 #define GRP_ID 1003 | 37 #define GRP_ID 1003 |
38 | 38 |
39 | 39 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 | 528 |
529 KernelHandle* handle = new KernelHandle(mnt, node, O_RDONLY); | 529 KernelHandle* handle = new KernelHandle(mnt, node, O_RDONLY); |
530 int fd = AllocateFD(handle); | 530 int fd = AllocateFD(handle); |
531 mnt->AcquireNode(node); | 531 mnt->AcquireNode(node); |
532 | 532 |
533 ReleaseHandle(handle); | 533 ReleaseHandle(handle); |
534 ReleaseMount(mnt); | 534 ReleaseMount(mnt); |
535 | 535 |
536 return fd; | 536 return fd; |
537 } | 537 } |
OLD | NEW |