diff options
Diffstat (limited to 'src/operations.cc')
-rw-r--r-- | src/operations.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/operations.cc b/src/operations.cc index abd2f0c..d22a1e2 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -33,10 +33,14 @@ #include <sys/types.h> #include <unistd.h> +#include "utility.h" + namespace scoville { namespace { +int root_fd_; + struct Directory { DIR* fd; dirent* entry; @@ -75,6 +79,8 @@ void* Initialize(fuse_conn_info*) { void Destroy(void*) { LOG(INFO) << "destroy"; + LOG_IF(ERROR, close(root_fd_) == -1) << "could not close root FD: " + << ErrnoText(); } int Getattr(const char* const path, struct stat* output) { @@ -153,7 +159,9 @@ int Releasedir(const char*, fuse_file_info* const file_info) { } // namespace -fuse_operations FuseOperations() { +fuse_operations FuseOperations(const int root_fd) { + root_fd_ = root_fd; + fuse_operations result; result.flag_nullpath_ok = true; |