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

Unified Diff: native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc

Issue 604513002: [NaCl SDK] nacl_io: Add chmod/fchmod (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc b/native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc
index 212f84ff8b74e5d5af324cb6d509ff31cefebb89..d072392631ee033118bab4ace1c85c32f2b18ffc 100644
--- a/native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc
@@ -261,6 +261,20 @@ Error FuseFsNode::Futimens(const struct timespec times[2]) {
return result;
}
+Error FuseFsNode::Fchmod(mode_t mode) {
+ int result;
+ if (!fuse_ops_->chmod) {
+ LOG_TRACE("fuse_ops_->chmod is NULL.");
+ return ENOSYS;
+ }
+
+ result = fuse_ops_->chmod(path_.c_str(), mode);
+ if (result < 0)
+ return -result;
+
+ return result;
+}
+
Error FuseFsNode::VIoctl(int request, va_list args) {
LOG_ERROR("Ioctl not implemented for fusefs.");
return ENOSYS;

Powered by Google App Engine
This is Rietveld 408576698