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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount_mem.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_MEM_H_ 5 #ifndef LIBRARIES_NACL_IO_MOUNT_MEM_H_
6 #define LIBRARIES_NACL_IO_MOUNT_MEM_H_ 6 #define LIBRARIES_NACL_IO_MOUNT_MEM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 // required to use correct locking as needed. 22 // required to use correct locking as needed.
23 23
24 // Allocate or free an INODE number. 24 // Allocate or free an INODE number.
25 int AllocateINO(); 25 int AllocateINO();
26 void FreeINO(int ino); 26 void FreeINO(int ino);
27 27
28 // Find a Node specified node optionally failing if type does not match. 28 // Find a Node specified node optionally failing if type does not match.
29 virtual Error FindNode(const Path& path, int type, MountNode** out_node); 29 virtual Error FindNode(const Path& path, int type, MountNode** out_node);
30 30
31 public: 31 public:
32 virtual Error Access(const Path& path, int a_mode);
32 virtual Error Open(const Path& path, int mode, MountNode** out_node); 33 virtual Error Open(const Path& path, int mode, MountNode** out_node);
33 virtual Error Unlink(const Path& path); 34 virtual Error Unlink(const Path& path);
34 virtual Error Mkdir(const Path& path, int perm); 35 virtual Error Mkdir(const Path& path, int perm);
35 virtual Error Rmdir(const Path& path); 36 virtual Error Rmdir(const Path& path);
36 virtual Error Remove(const Path& path); 37 virtual Error Remove(const Path& path);
37 38
38 private: 39 private:
39 static const int REMOVE_DIR = 1; 40 static const int REMOVE_DIR = 1;
40 static const int REMOVE_FILE = 2; 41 static const int REMOVE_FILE = 2;
41 static const int REMOVE_ALL = REMOVE_DIR | REMOVE_FILE; 42 static const int REMOVE_ALL = REMOVE_DIR | REMOVE_FILE;
42 43
43 Error RemoveInternal(const Path& path, int remove_type); 44 Error RemoveInternal(const Path& path, int remove_type);
44 45
45 MountNode* root_; 46 MountNode* root_;
46 size_t max_ino_; 47 size_t max_ino_;
47 48
48 friend class Mount; 49 friend class Mount;
49 DISALLOW_COPY_AND_ASSIGN(MountMem); 50 DISALLOW_COPY_AND_ASSIGN(MountMem);
50 }; 51 };
51 52
52 #endif // LIBRARIES_NACL_IO_MOUNT_MEM_H_ 53 #endif // LIBRARIES_NACL_IO_MOUNT_MEM_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_http.cc ('k') | native_client_sdk/src/libraries/nacl_io/mount_mem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698