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 #include "nacl_io/fusefs/fuse_fs.h" | 5 #include "nacl_io/fusefs/fuse_fs.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 return ENOSYS; | 254 return ENOSYS; |
255 } | 255 } |
256 | 256 |
257 result = fuse_ops_->utimens(path_.c_str(), times); | 257 result = fuse_ops_->utimens(path_.c_str(), times); |
258 if (result < 0) | 258 if (result < 0) |
259 return -result; | 259 return -result; |
260 | 260 |
261 return result; | 261 return result; |
262 } | 262 } |
263 | 263 |
| 264 Error FuseFsNode::Fchmod(mode_t mode) { |
| 265 int result; |
| 266 if (!fuse_ops_->chmod) { |
| 267 LOG_TRACE("fuse_ops_->chmod is NULL."); |
| 268 return ENOSYS; |
| 269 } |
| 270 |
| 271 result = fuse_ops_->chmod(path_.c_str(), mode); |
| 272 if (result < 0) |
| 273 return -result; |
| 274 |
| 275 return result; |
| 276 } |
| 277 |
264 Error FuseFsNode::VIoctl(int request, va_list args) { | 278 Error FuseFsNode::VIoctl(int request, va_list args) { |
265 LOG_ERROR("Ioctl not implemented for fusefs."); | 279 LOG_ERROR("Ioctl not implemented for fusefs."); |
266 return ENOSYS; | 280 return ENOSYS; |
267 } | 281 } |
268 | 282 |
269 Error FuseFsNode::Tcflush(int queue_selector) { | 283 Error FuseFsNode::Tcflush(int queue_selector) { |
270 LOG_ERROR("Tcflush not implemented for fusefs."); | 284 LOG_ERROR("Tcflush not implemented for fusefs."); |
271 return ENOSYS; | 285 return ENOSYS; |
272 } | 286 } |
273 | 287 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } else { | 490 } else { |
477 fill_info->getdents->AddDirent(ino, name, strlen(name)); | 491 fill_info->getdents->AddDirent(ino, name, strlen(name)); |
478 fill_info->num_bytes -= sizeof(dirent); | 492 fill_info->num_bytes -= sizeof(dirent); |
479 // According to the docs, we can never return 1 (buffer full) when the | 493 // According to the docs, we can never return 1 (buffer full) when the |
480 // offset is zero (the user is probably ignoring the result anyway). | 494 // offset is zero (the user is probably ignoring the result anyway). |
481 return 0; | 495 return 0; |
482 } | 496 } |
483 } | 497 } |
484 | 498 |
485 } // namespace nacl_io | 499 } // namespace nacl_io |
OLD | NEW |