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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount_passthrough.cc

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 #include "nacl_io/mount_passthrough.h" 5 #include "nacl_io/mount_passthrough.h"
6 #include <errno.h> 6 #include <errno.h>
7 #include "nacl_io/kernel_wrap_real.h" 7 #include "nacl_io/kernel_wrap_real.h"
8 8
9 class MountNodePassthrough : public MountNode { 9 class MountNodePassthrough : public MountNode {
10 public: 10 public:
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 MountPassthrough::MountPassthrough() {} 101 MountPassthrough::MountPassthrough() {}
102 102
103 Error MountPassthrough::Init(int dev, 103 Error MountPassthrough::Init(int dev,
104 StringMap_t& args, 104 StringMap_t& args,
105 PepperInterface* ppapi) { 105 PepperInterface* ppapi) {
106 return Mount::Init(dev, args, ppapi); 106 return Mount::Init(dev, args, ppapi);
107 } 107 }
108 108
109 void MountPassthrough::Destroy() {} 109 void MountPassthrough::Destroy() {}
110 110
111 Error MountPassthrough::Access(const Path& path, int a_mode) {
112 // There is no underlying 'access' syscall in NaCl. It just returns ENOSYS.
113 return ENOSYS;
114 }
115
111 Error MountPassthrough::Open(const Path& path, int mode, MountNode** out_node) { 116 Error MountPassthrough::Open(const Path& path, int mode, MountNode** out_node) {
112 *out_node = NULL; 117 *out_node = NULL;
113 118
114 int real_fd; 119 int real_fd;
115 int error = _real_open(path.Join().c_str(), mode, 0666, &real_fd); 120 int error = _real_open(path.Join().c_str(), mode, 0666, &real_fd);
116 if (error) 121 if (error)
117 return error; 122 return error;
118 123
119 MountNodePassthrough* node = new MountNodePassthrough(this, real_fd); 124 MountNodePassthrough* node = new MountNodePassthrough(this, real_fd);
120 *out_node = node; 125 *out_node = node;
(...skipping 23 matching lines...) Expand all
144 } 149 }
145 150
146 Error MountPassthrough::Rmdir(const Path& path) { 151 Error MountPassthrough::Rmdir(const Path& path) {
147 return _real_rmdir(path.Join().c_str()); 152 return _real_rmdir(path.Join().c_str());
148 } 153 }
149 154
150 Error MountPassthrough::Remove(const Path& path) { 155 Error MountPassthrough::Remove(const Path& path) {
151 // Not implemented by NaCl. 156 // Not implemented by NaCl.
152 return ENOSYS; 157 return ENOSYS;
153 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698