| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } else { | 240 } else { |
| 241 LOG_TRACE("fuse_ops_->fgetattr and fuse_ops_->getattr are NULL."); | 241 LOG_TRACE("fuse_ops_->fgetattr and fuse_ops_->getattr are NULL."); |
| 242 return ENOSYS; | 242 return ENOSYS; |
| 243 } | 243 } |
| 244 | 244 |
| 245 // Also update the cached stat values. | 245 // Also update the cached stat values. |
| 246 stat_ = *stat; | 246 stat_ = *stat; |
| 247 return 0; | 247 return 0; |
| 248 } | 248 } |
| 249 | 249 |
| 250 Error FuseFsNode::Futimens(const struct timespec times[2]) { |
| 251 int result; |
| 252 if (!fuse_ops_->utimens) { |
| 253 LOG_TRACE("fuse_ops_->utimens is NULL."); |
| 254 return ENOSYS; |
| 255 } |
| 256 |
| 257 result = fuse_ops_->utimens(path_.c_str(), times); |
| 258 if (result < 0) |
| 259 return -result; |
| 260 |
| 261 return result; |
| 262 } |
| 263 |
| 250 Error FuseFsNode::VIoctl(int request, va_list args) { | 264 Error FuseFsNode::VIoctl(int request, va_list args) { |
| 251 LOG_ERROR("Ioctl not implemented for fusefs."); | 265 LOG_ERROR("Ioctl not implemented for fusefs."); |
| 252 return ENOSYS; | 266 return ENOSYS; |
| 253 } | 267 } |
| 254 | 268 |
| 255 Error FuseFsNode::Tcflush(int queue_selector) { | 269 Error FuseFsNode::Tcflush(int queue_selector) { |
| 256 LOG_ERROR("Tcflush not implemented for fusefs."); | 270 LOG_ERROR("Tcflush not implemented for fusefs."); |
| 257 return ENOSYS; | 271 return ENOSYS; |
| 258 } | 272 } |
| 259 | 273 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 } else { | 476 } else { |
| 463 fill_info->getdents->AddDirent(ino, name, strlen(name)); | 477 fill_info->getdents->AddDirent(ino, name, strlen(name)); |
| 464 fill_info->num_bytes -= sizeof(dirent); | 478 fill_info->num_bytes -= sizeof(dirent); |
| 465 // According to the docs, we can never return 1 (buffer full) when the | 479 // According to the docs, we can never return 1 (buffer full) when the |
| 466 // offset is zero (the user is probably ignoring the result anyway). | 480 // offset is zero (the user is probably ignoring the result anyway). |
| 467 return 0; | 481 return 0; |
| 468 } | 482 } |
| 469 } | 483 } |
| 470 | 484 |
| 471 } // namespace nacl_io | 485 } // namespace nacl_io |
| OLD | NEW |