diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-22 22:55:01 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-22 22:55:01 -0500 |
commit | 1cdab3af0d1a53f75700ff437a59756052a403d8 (patch) | |
tree | de43970cab39df80ba8892514f95de064a3c269c | |
parent | 5b265792dddc21f8833cb01437b6d0dfb06a7d5d (diff) |
Use -o nonempty by default
-rw-r--r-- | src/scoville.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/scoville.cc b/src/scoville.cc index 2b79cf6..2eff02e 100644 --- a/src/scoville.cc +++ b/src/scoville.cc @@ -16,6 +16,7 @@ #include <memory> #include <system_error> +#include <vector> #include <fcntl.h> #include <gflags/gflags.h> @@ -49,5 +50,12 @@ int main(int argc, char* argv[]) { } LOG(INFO) << "overlaying " << root->path(); const fuse_operations operations = scoville::FuseOperations(root.get()); - return fuse_main(argc, argv, &operations, nullptr); + + // Add -o nonempty to argv so FUSE won't complain about overlaying. + char hyphen_o[] = "-o"; + char nonempty[] = "nonempty"; + std::vector<char*> new_argv(argv, argv + argc); + new_argv.emplace_back(hyphen_o); + new_argv.emplace_back(nonempty); + return fuse_main(new_argv.size(), new_argv.data(), &operations, nullptr); } |