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

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

Issue 565763002: Plumbing though mode parameter to open, since fusefs can make use of it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/filesystem.h" 5 #include "nacl_io/filesystem.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stdarg.h> 9 #include <stdarg.h>
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 Error Filesystem::Init(const FsInitArgs& args) { 33 Error Filesystem::Init(const FsInitArgs& args) {
34 dev_ = args.dev; 34 dev_ = args.dev;
35 ppapi_ = args.ppapi; 35 ppapi_ = args.ppapi;
36 return 0; 36 return 0;
37 } 37 }
38 38
39 void Filesystem::Destroy() { 39 void Filesystem::Destroy() {
40 } 40 }
41 41
42 Error Filesystem::Open(const Path& path,
43 int open_flags,
44 ScopedNode* out_node) {
45 return OpenWithMode(path, open_flags, 0666, out_node);
46 }
47
42 Error Filesystem::OpenResource(const Path& path, ScopedNode* out_node) { 48 Error Filesystem::OpenResource(const Path& path, ScopedNode* out_node) {
43 out_node->reset(NULL); 49 out_node->reset(NULL);
44 LOG_TRACE("Can't open resource: %s", path.Join().c_str()); 50 LOG_TRACE("Can't open resource: %s", path.Join().c_str());
45 return EINVAL; 51 return EINVAL;
46 } 52 }
47 53
48 void Filesystem::OnNodeCreated(Node* node) { 54 void Filesystem::OnNodeCreated(Node* node) {
49 node->stat_.st_ino = inode_pool_.Acquire(); 55 node->stat_.st_ino = inode_pool_.Acquire();
50 node->stat_.st_dev = dev_; 56 node->stat_.st_dev = dev_;
51 } 57 }
(...skipping 10 matching lines...) Expand all
62 68
63 Error Filesystem::Filesystem_Ioctl(int request, ...) { 69 Error Filesystem::Filesystem_Ioctl(int request, ...) {
64 va_list args; 70 va_list args;
65 va_start(args, request); 71 va_start(args, request);
66 Error error = Filesystem_VIoctl(request, args); 72 Error error = Filesystem_VIoctl(request, args);
67 va_end(args); 73 va_end(args);
68 return error; 74 return error;
69 } 75 }
70 76
71 } // namespace nacl_io 77 } // namespace nacl_io
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/filesystem.h ('k') | native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698