Browse Source

Merge pull request #361 from trapexit/cleanup

Cleanup
pull/362/head
Antonio SJ Musumeci 8 years ago
committed by GitHub
parent
commit
011febcb91
  1. 5
      src/access.hpp
  2. 5
      src/assert.hpp
  3. 5
      src/buildmap.hpp
  4. 5
      src/buildvector.hpp
  5. 2
      src/chmod.cpp
  6. 5
      src/chmod.hpp
  7. 2
      src/chown.cpp
  8. 5
      src/chown.hpp
  9. 5
      src/create.hpp
  10. 5
      src/destroy.hpp
  11. 5
      src/errno.hpp
  12. 5
      src/fallocate.hpp
  13. 5
      src/fgetattr.hpp
  14. 5
      src/flock.hpp
  15. 5
      src/flush.hpp
  16. 4
      src/fs.hpp
  17. 5
      src/fs_base_access.hpp
  18. 5
      src/fs_base_chmod.hpp
  19. 5
      src/fs_base_chown.hpp
  20. 5
      src/fs_base_close.hpp
  21. 5
      src/fs_base_closedir.hpp
  22. 5
      src/fs_base_dup.hpp
  23. 5
      src/fs_base_flock.hpp
  24. 8
      src/fs_base_fsync.hpp
  25. 5
      src/fs_base_ftruncate.hpp
  26. 5
      src/fs_base_getxattr.hpp
  27. 5
      src/fs_base_ioctl.hpp
  28. 5
      src/fs_base_link.hpp
  29. 5
      src/fs_base_listxattr.hpp
  30. 5
      src/fs_base_lseek.hpp
  31. 5
      src/fs_base_mkdir.hpp
  32. 5
      src/fs_base_mknod.hpp
  33. 5
      src/fs_base_open.hpp
  34. 5
      src/fs_base_opendir.hpp
  35. 5
      src/fs_base_read.hpp
  36. 5
      src/fs_base_readdir.hpp
  37. 5
      src/fs_base_readlink.hpp
  38. 5
      src/fs_base_realpath.hpp
  39. 21
      src/fs_base_remove.hpp
  40. 5
      src/fs_base_removexattr.hpp
  41. 5
      src/fs_base_rename.hpp
  42. 5
      src/fs_base_rmdir.hpp
  43. 5
      src/fs_base_setxattr.hpp
  44. 5
      src/fs_base_stat.hpp
  45. 5
      src/fs_base_statvfs.hpp
  46. 52
      src/fs_base_symlink.hpp
  47. 5
      src/fs_base_truncate.hpp
  48. 5
      src/fs_base_unlink.hpp
  49. 5
      src/fs_base_utime.hpp
  50. 5
      src/fs_base_utime_generic.hpp
  51. 5
      src/fs_base_utime_utimensat.hpp
  52. 5
      src/fs_base_write.hpp
  53. 5
      src/fs_clonefile.hpp
  54. 11
      src/fs_clonepath.cpp
  55. 8
      src/fs_clonepath.hpp
  56. 1
      src/fs_devid.hpp
  57. 4
      src/fs_movefile.cpp
  58. 5
      src/fsync.hpp
  59. 5
      src/ftruncate.hpp
  60. 5
      src/getattr.hpp
  61. 5
      src/getxattr.hpp
  62. 5
      src/init.hpp
  63. 5
      src/ioctl.hpp
  64. 6
      src/link.cpp
  65. 5
      src/link.hpp
  66. 5
      src/listxattr.hpp
  67. 18
      src/mergerfs.cpp
  68. 2
      src/mkdir.cpp
  69. 5
      src/mkdir.hpp
  70. 2
      src/mknod.cpp
  71. 6
      src/mknod.hpp
  72. 7
      src/num.hpp
  73. 5
      src/open.hpp
  74. 5
      src/opendir.hpp
  75. 5
      src/option_parser.hpp
  76. 5
      src/read.hpp
  77. 8
      src/readdir.hpp
  78. 5
      src/readlink.hpp
  79. 5
      src/release.hpp
  80. 5
      src/releasedir.hpp
  81. 2
      src/removexattr.cpp
  82. 5
      src/removexattr.hpp
  83. 12
      src/rename.cpp
  84. 5
      src/rename.hpp
  85. 5
      src/resources.hpp
  86. 2
      src/rmdir.cpp
  87. 5
      src/rmdir.hpp
  88. 13
      src/rv.hpp
  89. 5
      src/rwlock.hpp
  90. 2
      src/setxattr.cpp
  91. 5
      src/setxattr.hpp
  92. 5
      src/statfs.hpp
  93. 5
      src/statvfs_util.hpp
  94. 5
      src/str.hpp
  95. 5
      src/success_fail.hpp
  96. 6
      src/symlink.cpp
  97. 5
      src/symlink.hpp
  98. 2
      src/truncate.cpp
  99. 5
      src/truncate.hpp
  100. 2
      src/ugid.hpp

5
src/access.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ACCESS_HPP__
#define __ACCESS_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
int mask);
}
}
#endif

5
src/assert.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ASSERT_HPP__
#define __ASSERT_HPP__
#define STATIC_ASSERT(cond) assert::StaticAssert< (cond) >()
#define STATIC_ARRAYLENGTH_ASSERT(array,size) STATIC_ASSERT(((sizeof(array)/sizeof(array[0]))==(size)))
@ -26,3 +29,5 @@ namespace assert
struct StaticAssert<true>
{};
}
#endif

5
src/buildmap.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __BUILDMAP_HPP__
#define __BUILDMAP_HPP__
#include <algorithm>
template<typename K,typename V>
@ -41,3 +44,5 @@ public:
private:
std::map<K,V> _map;
};
#endif

5
src/buildvector.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __BUILDVECTOR_HPP__
#define __BUILDVECTOR_HPP__
#include <algorithm>
template<typename V, bool SORT = false>
@ -41,3 +44,5 @@ public:
private:
std::vector<V> _vector;
};
#endif

2
src/chmod.cpp

@ -45,7 +45,7 @@ _chmod_loop_core(const string *basepath,
rv = fs::chmod(fullpath,mode);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/chmod.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CHMOD_HPP__
#define __CHMOD_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
mode_t mode);
}
}
#endif

2
src/chown.cpp

@ -47,7 +47,7 @@ _chown_loop_core(const string *basepath,
rv = fs::lchown(fullpath,uid,gid);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/chown.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CHOWN_HPP__
#define __CHOWN_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
gid_t gid);
}
}
#endif

5
src/create.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CREATE_HPP__
#define __CREATE_HPP__
#include <fuse.h>
#include <sys/types.h>
@ -28,3 +31,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

5
src/destroy.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __DESTROY_HPP__
#define __DESTROY_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
destroy(void *);
}
}
#endif

5
src/errno.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ERRNO_HPP__
#define __ERRNO_HPP__
#include <errno.h>
#if defined(ENODATA) && !defined(ENOATTR)
@ -27,3 +30,5 @@
#if !defined(ENOATTR) && !defined(ENODATA)
#error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information"
#endif
#endif

5
src/fallocate.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FALLOCATE_HPP__
#define __FALLOCATE_HPP__
namespace mergerfs
{
namespace fuse
@ -26,3 +29,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

5
src/fgetattr.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FGETATTR_HPP__
#define __FGETATTR_HPP__
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@ -28,3 +31,5 @@ namespace mergerfs
fuse_file_info *fileinfo);
}
}
#endif

5
src/flock.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FLOCK_HPP__
#define __FLOCK_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
int op);
}
}
#endif

5
src/flush.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FLUSH_HPP__
#define __FLUSH_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

4
src/fs.hpp

@ -17,11 +17,11 @@
#ifndef __FS_HPP__
#define __FS_HPP__
#include <stdint.h>
#include <string>
#include <vector>
#include <stdint.h>
namespace fs
{
using std::string;

5
src/fs_base_access.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_ACCESS_HPP__
#define __FS_BASE_ACCESS_HPP__
#include <string>
#include <fcntl.h>
@ -53,3 +56,5 @@ namespace fs
return fs::access(path,mode,AT_EACCESS);
}
}
#endif

5
src/fs_base_chmod.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CHMOD_HPP__
#define __FS_BASE_CHMOD_HPP__
#include <sys/stat.h>
namespace fs
@ -47,3 +50,5 @@ namespace fs
return ::fchmod(fd,st.st_mode);
}
}
#endif

5
src/fs_base_chown.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CHOWN_HPP__
#define __FS_BASE_CHOWN_HPP__
#include <string>
#include <sys/stat.h>
@ -72,3 +75,5 @@ namespace fs
return fs::fchown(fd,st.st_uid,st.st_gid);
}
}
#endif

5
src/fs_base_close.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CLOSE_HPP__
#define __FS_BASE_CLOSE_HPP__
#include <unistd.h>
namespace fs
@ -28,3 +31,5 @@ namespace fs
return ::close(fd);
}
}
#endif

5
src/fs_base_closedir.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CLOSEDIR_HPP__
#define __FS_BASE_CLOSEDIR_HPP__
#include <dirent.h>
#include <sys/types.h>
@ -29,3 +32,5 @@ namespace fs
return ::closedir(dirp);
}
}
#endif

5
src/fs_base_dup.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_DUP_HPP__
#define __FS_BASE_DUP_HPP__
#include <unistd.h>
namespace fs
@ -28,3 +31,5 @@ namespace fs
return ::dup(fd);
}
}
#endif

5
src/fs_base_flock.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FLOCK_HPP__
#define __FS_BASE_FLOCK_HPP__
#include <sys/file.h>
namespace fs
@ -29,3 +32,5 @@ namespace fs
return ::flock(fd,operation);
}
}
#endif

8
src/fs_base_fsync.hpp

@ -16,9 +16,13 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <errno.h>
#ifndef __FS_BASE_FSYNC_HPP__
#define __FS_BASE_FSYNC_HPP__
#include <unistd.h>
#include "errno.hpp"
namespace fs
{
static
@ -41,3 +45,5 @@ namespace fs
#endif
}
}
#endif

5
src/fs_base_ftruncate.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FTRUNCATE_HPP__
#define __FS_BASE_FTRUNCATE_HPP__
#include <sys/types.h>
#include <unistd.h>
@ -30,3 +33,5 @@ namespace fs
return ::ftruncate(fd,size);
}
}
#endif

5
src/fs_base_getxattr.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_GETXATTR_HPP__
#define __FS_BASE_GETXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -38,3 +41,5 @@ namespace fs
#endif
}
}
#endif

5
src/fs_base_ioctl.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_IOCTL_HPP__
#define __FS_BASE_IOCTL_HPP__
#include <sys/ioctl.h>
namespace fs
@ -30,3 +33,5 @@ namespace fs
return ::ioctl(fd,request,data);
}
}
#endif

5
src/fs_base_link.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LINK_HPP__
#define __FS_BASE_LINK_HPP__
#include <string>
#include <unistd.h>
@ -31,3 +34,5 @@ namespace fs
return ::link(oldpath.c_str(),newpath.c_str());
}
}
#endif

5
src/fs_base_listxattr.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LISTXATTR_HPP__
#define __FS_BASE_LISTXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -37,3 +40,5 @@ namespace fs
#endif
}
}
#endif

5
src/fs_base_lseek.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LSEEK_HPP__
#define __FS_BASE_LSEEK_HPP__
#include <sys/types.h>
#include <unistd.h>
@ -31,3 +34,5 @@ namespace fs
return ::lseek(fd,offset,whence);
}
}
#endif

5
src/fs_base_mkdir.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_MKDIR_HPP__
#define __FS_BASE_MKDIR_HPP__
#include <string>
#include <sys/stat.h>
@ -32,3 +35,5 @@ namespace fs
return ::mkdir(path.c_str(),mode);
}
}
#endif

5
src/fs_base_mknod.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_MKNOD_HPP__
#define __FS_BASE_MKNOD_HPP__
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
@ -33,3 +36,5 @@ namespace fs
return ::mknod(path.c_str(),mode,dev);
}
}
#endif

5
src/fs_base_open.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_OPEN_HPP__
#define __FS_BASE_OPEN_HPP__
#include <string>
#include <fcntl.h>
@ -43,3 +46,5 @@ namespace fs
return ::open(path.c_str(),flags,mode);
}
}
#endif

5
src/fs_base_opendir.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_OPENDIR_HPP__
#define __FS_BASE_OPENDIR_HPP__
#include <string>
#include <dirent.h>
@ -31,3 +34,5 @@ namespace fs
return ::opendir(name.c_str());
}
}
#endif

5
src/fs_base_read.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_READ_HPP__
#define __FS_BASE_READ_HPP__
#include <unistd.h>
namespace fs
@ -41,3 +44,5 @@ namespace fs
return ::pread(fd,buf,count,offset);
}
}
#endif

5
src/fs_base_readdir.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_READDIR_HPP__
#define __FS_BASE_READDIR_HPP__
#include <dirent.h>
namespace fs
@ -28,3 +31,5 @@ namespace fs
return ::readdir(dirp);
}
}
#endif

5
src/fs_base_readlink.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_READLINK_HPP__
#define __FS_BASE_READLINK_HPP__
#include <string>
#include <unistd.h>
@ -32,3 +35,5 @@ namespace fs
return ::readlink(path.c_str(),buf,bufsiz);
}
}
#endif

5
src/fs_base_realpath.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_REALPATH_HPP__
#define __FS_BASE_REALPATH_HPP__
#include <string>
#include <limits.h>
@ -40,3 +43,5 @@ namespace fs
return fs::realpath(path,NULL);
}
}
#endif

21
src/clone.hpp → src/fs_base_remove.hpp

@ -1,4 +1,6 @@
/*
ISC License
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
Permission to use, copy, modify, and/or distribute this software for any
@ -14,9 +16,22 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
namespace clonetool
#ifndef __FS_BASE_REMOVE_HPP__
#define __FS_BASE_REMOVE_HPP__
#include <string>
#include <stdio.h>
namespace fs
{
static
inline
int
main(const int argc,
char * const *argv);
remove(const std::string &pathname)
{
return ::remove(pathname.c_str());
}
}
#endif

5
src/fs_base_removexattr.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_REMOVEXATTR_HPP__
#define __FS_BASE_REMOVEXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -36,3 +39,5 @@ namespace fs
#endif
}
}
#endif

5
src/fs_base_rename.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_RENAME_HPP__
#define __FS_BASE_RENAME_HPP__
#include <stdio.h>
namespace fs
@ -29,3 +32,5 @@ namespace fs
return ::rename(oldpath.c_str(),newpath.c_str());
}
}
#endif

5
src/fs_base_rmdir.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_RMDIR_HPP__
#define __FS_BASE_RMDIR_HPP__
#include <string>
#include <unistd.h>
@ -30,3 +33,5 @@ namespace fs
return ::rmdir(path.c_str());
}
}
#endif

5
src/fs_base_setxattr.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_SETXATTR_HPP__
#define __FS_BASE_SETXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -39,3 +42,5 @@ namespace fs
#endif
}
}
#endif

5
src/fs_base_stat.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_STAT_HPP__
#define __FS_BASE_STAT_HPP__
#include <string>
#include <sys/stat.h>
@ -60,3 +63,5 @@ namespace fs
return ::fstat(fd,&st);
}
}
#endif

5
src/fs_base_statvfs.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_STATVFS_HPP__
#define __FS_BASE_STATVFS_HPP__
#include <string>
#include <sys/statvfs.h>
@ -40,3 +43,5 @@ namespace fs
return fs::statvfs(path.c_str(),st);
}
}
#endif

52
src/clone.cpp → src/fs_base_symlink.hpp

@ -1,4 +1,6 @@
/*
ISC License
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
Permission to use, copy, modify, and/or distribute this software for any
@ -14,48 +16,32 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <unistd.h>
#include <string.h>
#ifndef __FS_BASE_SYMLINK_HPP__
#define __FS_BASE_SYMLINK_HPP__
#include <iostream>
#include <string>
#include "errno.hpp"
#include "fs.hpp"
#include "fs_clonefile.hpp"
#include "fs_clonepath.hpp"
#include <unistd.h>
namespace clonetool
namespace fs
{
static
void
print_usage_and__exit(void)
inline
int
symlink(const std::string &oldpath,
const std::string &newpath)
{
std::cerr << "usage: clone "
<< "[path <sourcedir> <destdir> <relativepath>]"
<< " | "
<< "[file <source> <dest>]"
<< std::endl;
_exit(1);
return ::symlink(oldpath.c_str(),newpath.c_str());
}
static
inline
int
main(const int argc,
char * const argv[])
symlink(const char *oldpath,
const std::string &newpath)
{
int rv = 0;
if(argc == 4 && !strcmp(argv[1],"file"))
rv = fs::clonefile(argv[2],argv[3]);
else if(argc == 5 && !strcmp(argv[1],"path"))
rv = fs::clonepath(argv[2],argv[3],argv[4]);
else
print_usage_and__exit();
if(rv == -1)
std::cerr << "error: "
<< strerror(errno)
<< std::endl;
return 0;
return ::symlink(oldpath,newpath.c_str());
}
}
#endif

5
src/fs_base_truncate.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_TRUNCATE_HPP__
#define __FS_BASE_TRUNCATE_HPP__
#include <string>
#include <sys/types.h>
@ -32,3 +35,5 @@ namespace fs
return ::truncate(path.c_str(),length);
}
}
#endif

5
src/fs_base_unlink.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UNLINK_HPP__
#define __FS_BASE_UNLINK_HPP__
#include <string>
#include <unistd.h>
@ -30,3 +33,5 @@ namespace fs
return ::unlink(path.c_str());
}
}
#endif

5
src/fs_base_utime.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_HPP__
#define __FS_BASE_UTIME_HPP__
#ifdef __linux__
# include "fs_base_utime_utimensat.hpp"
#elif __FreeBSD__ >= 11
@ -61,3 +64,5 @@ namespace fs
return fs::utime(AT_FDCWD,path,times,AT_SYMLINK_NOFOLLOW);
}
}
#endif

5
src/fs_base_utime_generic.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_GENERIC_HPP__
#define __FS_BASE_UTIME_GENERIC_HPP__
#include <string>
#include <fcntl.h>
@ -296,3 +299,5 @@ namespace fs
return ::futimes(fd,tvp);
}
}
#endif

5
src/fs_base_utime_utimensat.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_UTIMENSAT_HPP__
#define __FS_BASE_UTIME_UTIMENSAT_HPP__
#include <string>
#include <fcntl.h>
@ -43,3 +46,5 @@ namespace fs
return ::futimens(fd,times);
}
}
#endif

5
src/fs_base_write.hpp

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_WRITE_HPP__
#define __FS_BASE_WRITE_HPP__
#include <unistd.h>
namespace fs
@ -41,3 +44,5 @@ namespace fs
return ::pwrite(fd,buf,count,offset);
}
}
#endif

5
src/fs_clonefile.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_CLONEFILE_HPP__
#define __FS_CLONEFILE_HPP__
#include <string>
namespace fs
@ -23,3 +26,5 @@ namespace fs
int clonefile(const std::string &from,
const std::string &to);
}
#endif

11
src/fs_clonepath.cpp

@ -23,6 +23,7 @@
#include "fs_base_mkdir.hpp"
#include "fs_base_stat.hpp"
#include "fs_base_utime.hpp"
#include "fs_clonepath.hpp"
#include "fs_path.hpp"
#include "fs_xattr.hpp"
@ -62,7 +63,7 @@ namespace fs
fs::path::dirname(dirname);
if(!dirname.empty())
{
rv = fs::clonepath(fromsrc,tosrc,dirname.c_str());
rv = fs::clonepath(fromsrc,tosrc,dirname);
if(rv == -1)
return -1;
}
@ -105,4 +106,12 @@ namespace fs
return 0;
}
int
clonepath(const std::string &from,
const std::string &to,
const std::string &relative)
{
return fs::clonepath(from,to,relative.c_str());
}
}

8
src/fs_clonepath.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_CLONEPATH_HPP__
#define __FS_CLONEPATH_HPP__
#include <string>
namespace fs
@ -21,4 +24,9 @@ namespace fs
int clonepath(const std::string &from,
const std::string &to,
const char *relative);
int clonepath(const std::string &from,
const std::string &to,
const std::string &relative);
}
#endif

1
src/fs_devid.hpp

@ -42,4 +42,3 @@ namespace fs
}
#endif

4
src/fs_movefile.cpp

@ -72,7 +72,7 @@ namespace fs
fusedir = fusepath;
fs::path::dirname(fusedir);
rv = fs::clonepath(fdin_path,fdout_path,fusedir.c_str());
rv = fs::clonepath(fdin_path,fdout_path,fusedir);
if(rv == -1)
return -1;
@ -91,7 +91,7 @@ namespace fs
{
fs::close(fdin);
fs::close(fdout);
fs::unlink(fdout_path.c_str());
fs::unlink(fdout_path);
return -1;
}

5
src/fsync.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FSYNC_HPP__
#define __FSYNC_HPP__
#include <fuse.h>
namespace mergerfs
@ -26,3 +29,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

5
src/ftruncate.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FTRUNCATE_HPP__
#define __FTRUNCATE_HPP__
#include <fuse.h>
#include <sys/types.h>
@ -29,3 +32,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

5
src/getattr.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __GETATTR_HPP__
#define __GETATTR_HPP__
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@ -27,3 +30,5 @@ namespace mergerfs
struct stat *buf);
}
}
#endif

5
src/getxattr.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __GETXATTR_HPP__
#define __GETXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -25,3 +28,5 @@ namespace mergerfs
size_t count);
}
}
#endif

5
src/init.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __INIT_HPP__
#define __INIT_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
init(fuse_conn_info *conn);
}
}
#endif

5
src/ioctl.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __IOCTL_HPP__
#define __IOCTL_HPP__
namespace mergerfs
{
namespace fuse
@ -27,3 +30,5 @@ namespace mergerfs
void *data);
}
}
#endif

6
src/link.cpp

@ -49,7 +49,7 @@ _link_create_path_core(const string &oldbasepath,
if(oldbasepath != newbasepath)
{
const ugid::SetRootGuard ugidGuard;
rv = fs::clonepath(newbasepath,oldbasepath,newfusedirpath.c_str());
rv = fs::clonepath(newbasepath,oldbasepath,newfusedirpath);
if(rv == -1)
return errno;
}
@ -59,7 +59,7 @@ _link_create_path_core(const string &oldbasepath,
rv = fs::link(oldfullpath,newfullpath);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static
@ -176,7 +176,7 @@ _link_preserve_path_core(Policy::Func::Search searchFunc,
rv = fs::link(oldfullpath,newfullpath);
}
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/link.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __LINK_HPP__
#define __LINK_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *to);
}
}
#endif

5
src/listxattr.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __LISTXATTR_HPP__
#define __LISTXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
size_t count);
}
}
#endif

18
src/mergerfs.cpp

@ -20,12 +20,10 @@
#include <cstdlib>
#include <iostream>
#include "fs_path.hpp"
#include "mergerfs.hpp"
#include "option_parser.hpp"
#include "resources.hpp"
#include "fs_path.hpp"
#include "clone.hpp"
#include "access.hpp"
#include "chmod.hpp"
@ -68,14 +66,6 @@
namespace local
{
static
std::string
getappname(const int argc,
char * const *argv)
{
return fs::path::basename(argv[0]);
}
static
void
get_fuse_operations(struct fuse_operations &ops,
@ -190,11 +180,5 @@ int
main(int argc,
char **argv)
{
std::string appname;
appname = local::getappname(argc,argv);
if(appname == "clone")
return clonetool::main(argc,argv);
return mergerfs::main(argc,argv);
}

2
src/mkdir.cpp

@ -71,7 +71,7 @@ _mkdir_loop_core(const string &existingpath,
rv = _mkdir_core(fullpath,mode,umask);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/mkdir.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MKDIR_HPP__
#define __MKDIR_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
mode_t mode);
}
}
#endif

2
src/mknod.cpp

@ -73,7 +73,7 @@ _mknod_loop_core(const string &existingpath,
rv = _mknod_core(fullpath,mode,umask,dev);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

6
src/mknod.hpp

@ -1,3 +1,4 @@
/*
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
@ -14,6 +15,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MKNOD_HPP__
#define __MKNOD_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +28,5 @@ namespace mergerfs
dev_t rdev);
}
}
#endif

7
src/num.hpp

@ -14,11 +14,16 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdint.h>
#ifndef __NUM_HPP__
#define __NUM_HPP__
#include <string>
#include <stdint.h>
namespace num
{
int to_uint64_t(const std::string &str, uint64_t &value);
}
#endif

5
src/open.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPEN_HPP__
#define __OPEN_HPP__
#include <fuse.h>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

5
src/opendir.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPENDIR_HPP__
#define __OPENDIR_HPP__
#include <vector>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

5
src/option_parser.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPTION_PARSER_HPP__
#define __OPTION_PARSER_HPP__
#include <fuse.h>
#include "config.hpp"
@ -27,3 +30,5 @@ namespace mergerfs
Config &config);
}
}
#endif

5
src/read.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READ_HPP__
#define __READ_HPP__
namespace mergerfs
{
namespace fuse
@ -33,3 +36,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

8
src/readdir.hpp

@ -14,14 +14,14 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MERGERFS_READDIR_HPP__
#define __MERGERFS_READDIR_HPP__
#include <fuse.h>
#ifndef __READDIR_HPP__
#define __READDIR_HPP__
#include <string>
#include <vector>
#include <fuse.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

5
src/readlink.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READLINK_HPP__
#define __READLINK_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
size_t size);
}
}
#endif

5
src/release.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RELEASE_HPP__
#define __RELEASE_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

5
src/releasedir.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RELEASEDIR_HPP__
#define __RELEASEDIR_HPP__
#include <fuse.h>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

2
src/removexattr.cpp

@ -45,7 +45,7 @@ _removexattr_loop_core(const string *basepath,
rv = fs::lremovexattr(fullpath,attrname);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/removexattr.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __REMOVEXATTR_HPP__
#define __REMOVEXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *attrname);
}
}
#endif

12
src/rename.cpp

@ -21,6 +21,7 @@
#include "config.hpp"
#include "errno.hpp"
#include "fs_base_remove.hpp"
#include "fs_base_rename.hpp"
#include "fs_clonepath.hpp"
#include "fs_path.hpp"
@ -32,7 +33,6 @@
using std::string;
using std::vector;
using std::set;
using mergerfs::Policy;
using namespace mergerfs;
static
@ -54,7 +54,7 @@ void
_remove(const vector<string> &toremove)
{
for(size_t i = 0, ei = toremove.size(); i != ei; i++)
::remove(toremove[i].c_str());
fs::remove(toremove[i]);
}
static
@ -70,7 +70,7 @@ _rename(const std::string &oldbasepath,
if(oldbasepath != newbasepath)
{
const ugid::SetRootGuard guard;
rv = fs::clonepath(newbasepath,oldbasepath,newfusedirpath.c_str());
rv = fs::clonepath(newbasepath,oldbasepath,newfusedirpath);
if(rv == -1)
return -1;
}
@ -103,7 +103,7 @@ _rename_create_path_core(const vector<const string*> &oldbasepaths,
rv = _rename(oldbasepath,oldfullpath,
newbasepath,newfusedirpath,newfullpath);
error = calc_error(rv,error,errno);
error = error::calc(rv,error,errno);
if(RENAME_FAILED(rv))
tounlink.push_back(oldfullpath);
}
@ -173,7 +173,7 @@ _clonepath(Policy::Func::Search searchFunc,
{
const ugid::SetRootGuard ugidGuard;
fs::clonepath(*srcbasepath[0],dstbasepath,fusedirpath.c_str());
fs::clonepath(*srcbasepath[0],dstbasepath,fusedirpath);
}
return POLICY_SUCCESS;
@ -241,7 +241,7 @@ _rename_preserve_path_core(Policy::Func::Search searchFunc,
rv = fs::rename(oldfullpath,newfullpath);
}
error = calc_error(rv,error,errno);
error = error::calc(rv,error,errno);
if(RENAME_FAILED(rv))
toremove.push_back(oldfullpath);
}

5
src/rename.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RENAME_HPP__
#define __RENAME_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *to);
}
}
#endif

5
src/resources.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RESOURCES_HPP__
#define __RESOURCES_HPP__
namespace mergerfs
{
namespace resources
@ -25,3 +28,5 @@ namespace mergerfs
int setpriority(const int prio);
}
}
#endif

2
src/rmdir.cpp

@ -45,7 +45,7 @@ _rmdir_loop_core(const string *basepath,
rv = fs::rmdir(fullpath);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}

5
src/rmdir.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RMDIR_HPP__
#define __RMDIR_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
rmdir(const char *fusepath);
}
}
#endif

13
src/rv.hpp

@ -17,13 +17,15 @@
#ifndef __RV_HPP__
#define __RV_HPP__
static
inline
int
calc_error(const int rv,
namespace error
{
static
inline
int
calc(const int rv,
const int prev,
const int cur)
{
{
if(rv == -1)
{
if(prev == 0)
@ -32,6 +34,7 @@ calc_error(const int rv,
}
return 0;
}
}
#endif // __RV_HPP__

5
src/rwlock.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RWLOCK_HPP__
#define __RWLOCK_HPP__
#include <pthread.h>
namespace mergerfs
@ -63,3 +66,5 @@ namespace mergerfs
};
}
}
#endif

2
src/setxattr.cpp

@ -303,7 +303,7 @@ _setxattr_loop_core(const string *basepath,
rv = fs::lsetxattr(fullpath,attrname,attrval,attrvalsize,flags);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/setxattr.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __SETXATTR_HPP__
#define __SETXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -26,3 +29,5 @@ namespace mergerfs
int flags);
}
}
#endif

5
src/statfs.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __STATFS_HPP__
#define __STATFS_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
struct statvfs *fsstat);
}
}
#endif

5
src/statvfs_util.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __STATVFS_UTIL_HPP__
#define __STATVFS_UTIL_HPP__
#include <string>
#include <sys/statvfs.h>
@ -46,3 +49,5 @@ namespace StatVFS
return (st.f_frsize * (st.f_blocks - st.f_bavail));
}
}
#endif

5
src/str.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __STR_HPP__
#define __STR_HPP__
#include <string>
#include <vector>
@ -55,3 +58,5 @@ namespace str
isprefix(const std::string &s0,
const std::string &s1);
}
#endif

5
src/success_fail.hpp

@ -14,7 +14,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MERGERFS_SUCCESS_FAIL_HPP__
#ifndef __SUCCESS_FAIL_HPP__
#define __SUCCESS_FAIL_HPP__
#define STATVFS_SUCCESS 0
#define STATVFS_SUCCEEDED(RV) ((RV) == STATVFS_SUCCESS)
@ -42,4 +43,4 @@
#define RENAME_FAILED(RV) ((RV) == RENAME_FAIL)
#define RENAME_FAILED_WITH(RV,ERRNO) (((RV) == RENAME_FAIL) && (errno == ERRNO))
#endif /*__MERGERFS_SUCCESS_FAIL_HPP__ */
#endif

6
src/symlink.cpp

@ -23,6 +23,7 @@
#include "config.hpp"
#include "errno.hpp"
#include "fs_base_symlink.hpp"
#include "fs_clonepath.hpp"
#include "fs_path.hpp"
#include "rv.hpp"
@ -31,7 +32,6 @@
using std::string;
using std::vector;
using mergerfs::Policy;
using namespace mergerfs;
static
@ -56,9 +56,9 @@ _symlink_loop_core(const string &existingpath,
fs::path::make(&newbasepath,newpath,fullnewpath);
rv = ::symlink(oldpath,fullnewpath.c_str());
rv = fs::symlink(oldpath,fullnewpath);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/symlink.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __SYMLINK_HPP__
#define __SYMLINK_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *newpath);
}
}
#endif

2
src/truncate.cpp

@ -48,7 +48,7 @@ _truncate_loop_core(const string *basepath,
rv = fs::truncate(fullpath,size);
return calc_error(rv,error,errno);
return error::calc(rv,error,errno);
}
static

5
src/truncate.hpp

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __TRUNCATE_HPP__
#define __TRUNCATE_HPP__
#include <sys/types.h>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
off_t size);
}
}
#endif

2
src/ugid.hpp

@ -37,4 +37,4 @@ namespace mergerfs
#include "ugid_rwlock.hpp"
#endif
#endif /* __UGID_HPP__ */
#endif

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save