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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount.h

Issue 15800004: [NaCl SDK] nacl_io: Added support for access() syscall. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to HEAD. Created 7 years, 6 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
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 #ifndef LIBRARIES_NACL_IO_MOUNT_H_ 5 #ifndef LIBRARIES_NACL_IO_MOUNT_H_
6 #define LIBRARIES_NACL_IO_MOUNT_H_ 6 #define LIBRARIES_NACL_IO_MOUNT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 PepperInterface* ppapi() { return ppapi_; } 46 PepperInterface* ppapi() { return ppapi_; }
47 47
48 // Assumes that |node| is non-NULL. 48 // Assumes that |node| is non-NULL.
49 void AcquireNode(MountNode* node); 49 void AcquireNode(MountNode* node);
50 // Assumes that |node| is non-NULL. 50 // Assumes that |node| is non-NULL.
51 void ReleaseNode(MountNode* node); 51 void ReleaseNode(MountNode* node);
52 52
53 // All paths in functions below are expected to containing a leading "/". 53 // All paths in functions below are expected to containing a leading "/".
54 54
55 // Test whether a file or directory at a given path can be accessed.
56 // Returns 0 on success, or an appropriate errno value on failure.
57 virtual Error Access(const Path& path, int a_mode) = 0;
58
55 // Open a node at |path| with the specified open flags. The resulting 59 // Open a node at |path| with the specified open flags. The resulting
56 // MountNode is created with a ref count of 1. 60 // MountNode is created with a ref count of 1.
57 // Assumes that |out_node| is non-NULL. 61 // Assumes that |out_node| is non-NULL.
58 virtual Error Open(const Path& path, int o_flags, MountNode** out_node) = 0; 62 virtual Error Open(const Path& path, int o_flags, MountNode** out_node) = 0;
59 63
60 // OpenResource is only used to read files from the NaCl NMF file. No mount 64 // OpenResource is only used to read files from the NaCl NMF file. No mount
61 // except MountPassthrough should implement it. 65 // except MountPassthrough should implement it.
62 // Assumes that |out_node| is non-NULL. 66 // Assumes that |out_node| is non-NULL.
63 virtual Error OpenResource(const Path& path, MountNode** out_node); 67 virtual Error OpenResource(const Path& path, MountNode** out_node);
64 68
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 delete mnt; 110 delete mnt;
107 *out_mount = NULL; 111 *out_mount = NULL;
108 return error; 112 return error;
109 } 113 }
110 114
111 *out_mount = mnt; 115 *out_mount = mnt;
112 return 0; 116 return 0;
113 } 117 }
114 118
115 #endif // LIBRARIES_NACL_IO_MOUNT_H_ 119 #endif // LIBRARIES_NACL_IO_MOUNT_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc ('k') | native_client_sdk/src/libraries/nacl_io/mount_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698