summaryrefslogtreecommitdiff
path: root/netfs/fuse/fuseAppBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/fuse/fuseAppBase.cpp')
-rw-r--r--netfs/fuse/fuseAppBase.cpp143
1 files changed, 94 insertions, 49 deletions
diff --git a/netfs/fuse/fuseAppBase.cpp b/netfs/fuse/fuseAppBase.cpp
index 4d06b44..f2c1f30 100644
--- a/netfs/fuse/fuseAppBase.cpp
+++ b/netfs/fuse/fuseAppBase.cpp
@@ -1,11 +1,11 @@
#include "fuseAppBase.h"
-#include <cerrno>
+#include <boost/assert.hpp>
#include <cassert>
+#include <cerrno>
#include <cstdio>
-#include <unistd.h>
#include <cstdlib>
#include <typeinfo>
-#include <boost/assert.hpp>
+#include <unistd.h>
FuseAppBase * FuseAppBase::fuseApp;
@@ -27,177 +27,221 @@ FuseAppBase::~FuseAppBase()
// to call them in a realistic manner. They exist only as the default
// implementation of the function which is never passed to libfuse
// unless it is overridden.
-void * FuseAppBase::init(fuse_conn_info*, fuse_config *)
+void *
+FuseAppBase::init(fuse_conn_info *, fuse_config *)
{
return nullptr;
}
-int FuseAppBase::access(const char *, int)
+int
+FuseAppBase::access(const char *, int)
{
return -ENOSYS;
}
-int FuseAppBase::chmod(const char *, mode_t, struct fuse_file_info *)
+int
+FuseAppBase::chmod(const char *, mode_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::chown(const char *, uid_t, gid_t, struct fuse_file_info *)
+int
+FuseAppBase::chown(const char *, uid_t, gid_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::create(const char *, mode_t, struct fuse_file_info *)
+int
+FuseAppBase::create(const char *, mode_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::getattr(const char *, struct stat *, struct fuse_file_info *)
+int
+FuseAppBase::getattr(const char *, struct stat *, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::flush(const char *, struct fuse_file_info *)
+int
+FuseAppBase::flush(const char *, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::fsync(const char *, int, struct fuse_file_info *)
+int
+FuseAppBase::fsync(const char *, int, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::fsyncdir(const char *, int, struct fuse_file_info *)
+int
+FuseAppBase::fsyncdir(const char *, int, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::truncate(const char *, off_t, struct fuse_file_info *)
+int
+FuseAppBase::truncate(const char *, off_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::getxattr(const char *, const char *, char *, size_t)
+int
+FuseAppBase::getxattr(const char *, const char *, char *, size_t)
{
return -ENOSYS;
}
-int FuseAppBase::link(const char *, const char *)
+int
+FuseAppBase::link(const char *, const char *)
{
return -ENOSYS;
}
-int FuseAppBase::listxattr(const char *, char *, size_t)
+int
+FuseAppBase::listxattr(const char *, char *, size_t)
{
return -ENOSYS;
}
-int FuseAppBase::mkdir(const char *, mode_t)
+int
+FuseAppBase::mkdir(const char *, mode_t)
{
return -ENOSYS;
}
-int FuseAppBase::mknod(const char *, mode_t, dev_t)
+int
+FuseAppBase::mknod(const char *, mode_t, dev_t)
{
return -ENOSYS;
}
-int FuseAppBase::open(const char *, struct fuse_file_info *)
+int
+FuseAppBase::open(const char *, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::opendir(const char *, struct fuse_file_info *)
+int
+FuseAppBase::opendir(const char *, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::read(const char *, char *, size_t, off_t, struct fuse_file_info *)
+int
+FuseAppBase::read(const char *, char *, size_t, off_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::readdir(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)
+int
+FuseAppBase::readdir(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)
{
return -ENOSYS;
}
-int FuseAppBase::readlink(const char *, char *, size_t)
+int
+FuseAppBase::readlink(const char *, char *, size_t)
{
return -ENOSYS;
}
-int FuseAppBase::release(const char *, struct fuse_file_info *)
+int
+FuseAppBase::release(const char *, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::releasedir(const char *, struct fuse_file_info *)
+int
+FuseAppBase::releasedir(const char *, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::removexattr(const char *, const char *)
+int
+FuseAppBase::removexattr(const char *, const char *)
{
return -ENOSYS;
}
-int FuseAppBase::rename(const char *, const char *, unsigned int)
+int
+FuseAppBase::rename(const char *, const char *, unsigned int)
{
return -ENOSYS;
}
-int FuseAppBase::rmdir(const char *)
+int
+FuseAppBase::rmdir(const char *)
{
return -ENOSYS;
}
-int FuseAppBase::setxattr(const char *, const char *, const char *, size_t, int)
+int
+FuseAppBase::setxattr(const char *, const char *, const char *, size_t, int)
{
return -ENOSYS;
}
-int FuseAppBase::statfs(const char *, struct statvfs *)
+int
+FuseAppBase::statfs(const char *, struct statvfs *)
{
return -ENOSYS;
}
-int FuseAppBase::symlink(const char *, const char *)
+int
+FuseAppBase::symlink(const char *, const char *)
{
return -ENOSYS;
}
-int FuseAppBase::unlink(const char *)
+int
+FuseAppBase::unlink(const char *)
{
return -ENOSYS;
}
-int FuseAppBase::write(const char *, const char *, size_t, off_t, struct fuse_file_info *)
+int
+FuseAppBase::write(const char *, const char *, size_t, off_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::lock(const char *, struct fuse_file_info *, int, struct flock *)
+int
+FuseAppBase::lock(const char *, struct fuse_file_info *, int, struct flock *)
{
return -ENOSYS;
}
// NOLINTNEXTLINE(modernize-avoid-c-arrays, hicpp-avoid-c-arrays)
-int FuseAppBase::utimens(const char *, const struct timespec[2], struct fuse_file_info *)
+int
+FuseAppBase::utimens(const char *, const struct timespec[2], struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::bmap(const char *, size_t, uint64_t *)
+int
+FuseAppBase::bmap(const char *, size_t, uint64_t *)
{
return -ENOSYS;
}
-int FuseAppBase::ioctl(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
+int
+FuseAppBase::ioctl(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
{
return -ENOSYS;
}
-int FuseAppBase::poll(const char *, struct fuse_file_info *, struct fuse_pollhandle *, unsigned *)
+int
+FuseAppBase::poll(const char *, struct fuse_file_info *, struct fuse_pollhandle *, unsigned *)
{
return -ENOSYS;
}
-int FuseAppBase::write_buf(const char *, struct fuse_bufvec *, off_t, struct fuse_file_info *)
+int
+FuseAppBase::write_buf(const char *, struct fuse_bufvec *, off_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::read_buf(const char *, struct fuse_bufvec **, size_t, off_t, struct fuse_file_info *)
+int
+FuseAppBase::read_buf(const char *, struct fuse_bufvec **, size_t, off_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-int FuseAppBase::flock(const char *, struct fuse_file_info *, int)
+int
+FuseAppBase::flock(const char *, struct fuse_file_info *, int)
{
return -ENOSYS;
}
-int FuseAppBase::fallocate(const char *, int, off_t, off_t, struct fuse_file_info *)
+int
+FuseAppBase::fallocate(const char *, int, off_t, off_t, struct fuse_file_info *)
{
return -ENOSYS;
}
-ssize_t FuseAppBase::copy_file_range(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
+ssize_t
+FuseAppBase::copy_file_range(
+ const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
{
return -ENOSYS;
}
-off_t FuseAppBase::lseek(const char *, off_t, int, struct fuse_file_info *)
+off_t
+FuseAppBase::lseek(const char *, off_t, int, struct fuse_file_info *)
{
return -ENOSYS;
}
// LCOV_EXCL_STOP
-void FuseAppBase::log(int level, const char * message) const noexcept
+void
+FuseAppBase::log(int level, const char * message) const noexcept
{
logf(level, "%s", message);
}
-void FuseAppBase::logf(int level, const char * fmt, ...) const noexcept
+void
+FuseAppBase::logf(int level, const char * fmt, ...) const noexcept
{
va_list args;
va_start(args, fmt);
@@ -205,13 +249,14 @@ void FuseAppBase::logf(int level, const char * fmt, ...) const noexcept
va_end(args);
}
-int FuseAppBase::onError(const std::exception & e) noexcept
+int
+FuseAppBase::onError(const std::exception & e) noexcept
{
logf(LOG_ERR, "Unknown exception (what: %s)", e.what());
return -ENOSYS;
}
-void FuseAppBase::beforeOperation()
+void
+FuseAppBase::beforeOperation()
{
}
-