OLD | NEW |
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 #if defined(WIN32) | 5 #if defined(WIN32) |
6 #define _CRT_RAND_S | 6 #define _CRT_RAND_S |
7 #endif | 7 #endif |
8 | 8 |
9 #include "nacl_io/devfs/dev_fs.h" | 9 #include "nacl_io/devfs/dev_fs.h" |
10 | 10 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 FsNode::FsNode(Filesystem* filesystem, Filesystem* other_fs) | 233 FsNode::FsNode(Filesystem* filesystem, Filesystem* other_fs) |
234 : Node(filesystem), other_fs_(other_fs) { | 234 : Node(filesystem), other_fs_(other_fs) { |
235 } | 235 } |
236 | 236 |
237 Error FsNode::VIoctl(int request, va_list args) { | 237 Error FsNode::VIoctl(int request, va_list args) { |
238 return other_fs_->Filesystem_VIoctl(request, args); | 238 return other_fs_->Filesystem_VIoctl(request, args); |
239 } | 239 } |
240 | 240 |
241 } // namespace | 241 } // namespace |
242 | 242 |
243 Error DevFs::Open(const Path& path, int open_flags, ScopedNode* out_node) { | 243 Error DevFs::OpenWithMode(const Path& path, int open_flags, |
| 244 mode_t mode, ScopedNode* out_node) { |
244 out_node->reset(NULL); | 245 out_node->reset(NULL); |
245 int error; | 246 int error; |
246 if (path.Part(1) == "fs") { | 247 if (path.Part(1) == "fs") { |
247 if (path.Size() == 3) { | 248 if (path.Size() == 3) { |
248 error = fs_dir_->FindChild(path.Part(2), out_node); | 249 error = fs_dir_->FindChild(path.Part(2), out_node); |
249 } else { | 250 } else { |
250 LOG_TRACE("Bad devfs path: %s", path.Join().c_str()); | 251 LOG_TRACE("Bad devfs path: %s", path.Join().c_str()); |
251 error = ENOENT; | 252 error = ENOENT; |
252 } | 253 } |
253 } else { | 254 } else { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // Add a directory for "fs" nodes; they represent all currently-mounted | 348 // Add a directory for "fs" nodes; they represent all currently-mounted |
348 // filesystems. We can ioctl these nodes to make changes or provide input to | 349 // filesystems. We can ioctl these nodes to make changes or provide input to |
349 // a mounted filesystem. | 350 // a mounted filesystem. |
350 INITIALIZE_DEV_NODE("/fs", DirNode); | 351 INITIALIZE_DEV_NODE("/fs", DirNode); |
351 fs_dir_ = new_node; | 352 fs_dir_ = new_node; |
352 | 353 |
353 return 0; | 354 return 0; |
354 } | 355 } |
355 | 356 |
356 } // namespace nacl_io | 357 } // namespace nacl_io |
OLD | NEW |