int ret = EXIT_FAILURE;
char *pidfile = NULL, *saveptr = NULL, *token = NULL, *v = NULL;
char pidfile_buf[STRLITERALLEN(RUNTIME_PATH) + STRLITERALLEN("/lxcfs.pid") + 1] = {};
- bool debug = false, foreground = false, nonempty = false;
+ bool debug = false, foreground = false;
+#ifndef HAVE_FUSE3
+ bool nonempty = false;
+#endif
bool load_use = false;
/*
* what we pass to fuse_main is:
if (strcmp(token, "allow_other") == 0) {
/* Noop. this is the default. Always enabled. */
} else if (strcmp(token, "nonempty") == 0) {
+#ifdef HAVE_FUSE3
+ /* FUSE3: Noop. this is the default. */
+#else
nonempty = true;
+#endif
} else {
lxcfs_error("Warning: unexpected fuse option %s", v);
free(v);
* shouldn't guarantee that we don't need more complicated access
* helpers for proc and sys virtualization in the future.
*/
+#ifdef HAVE_FUSE3
+ newargv[cnt++] = "allow_other,entry_timeout=0.5,attr_timeout=0.5";
+#else
if (nonempty)
newargv[cnt++] = "allow_other,direct_io,entry_timeout=0.5,attr_timeout=0.5,nonempty";
else
newargv[cnt++] = "allow_other,direct_io,entry_timeout=0.5,attr_timeout=0.5";
+#endif
newargv[cnt++] = argv[1];
newargv[cnt++] = NULL;
if (!fuse_main(nargs, newargv, &lxcfs_ops, opts))
ret = EXIT_SUCCESS;
+
if (load_use)
stop_loadavg();