Antonio SJ Musumeci
105511d056
Fallback to fusermount3 where available
Also general cleanup of mount_generic.
6 hours ago
Antonio SJ Musumeci
5b83bc0ad2
replace raw C-strings with std::string in converted libfuse files
util/mount.mergerfs.cpp:
- Remove xstrdup/xrealloc wrappers entirely
- Convert type, source, options, command, setuid to std::string
- Replace add_arg() pointer-rewriting with shell_quote() returning std::string
- Replace add_option() with simple std::string += concatenation
- Fix const_cast UB on string literal assignment
lib/helper.cpp:
- Convert add_default_subtype local subtype_opt: malloc+snprintf+free -> std::string construction
lib/mount_generic.h:
- Convert fuse_mount_sys locals source/type: malloc+strcpy+strcat -> std::string
- Remove 4 unnecessary free() calls (RAII cleanup)
- .c_str() at mount() and fuse_mnt_add_mount() boundaries
lib/mount_util.h:
- Rewrite fuse_mnt_resolve_path internals using std::string: rfind/substr
instead of manual pointer arithmetic, strrchr, strlen chains
2 days ago
Antonio SJ Musumeci
4cc628e231
Convert vendored/libfuse C sources to C++17
Convert all C source files in vendored/libfuse/ to C++17:
- lib/crc32b.c -> crc32b.cpp (const void* cast)
- lib/fuse_opt.c -> fuse_opt.cpp (designated init, void* arithmetic)
- lib/fuse_signals.c -> fuse_signals.cpp
- lib/helper.c -> helper.cpp (void* data cast)
- lib/mount.c -> mount.cpp (thin wrapper)
- lib/mount_generic.c -> mount_generic.h (static inline, #pragma once)
- lib/mount_bsd.c -> mount_bsd.h (static inline, #pragma once)
- lib/mount_util.c -> mount_util.h (static inline, #pragma once)
- util/fusermount.c -> fusermount.cpp
- util/mount.mergerfs.c -> mount.mergerfs.cpp
Key changes:
- Replace C99 designated initializer in fuse_opt_parse with field-by-field init
- Fix void* pointer arithmetic via char* base + offset pattern
- All C-style (T*)voidptr casts replaced with static_cast/reinterpret_cast
- Remove redundant #define _GNU_SOURCE (already in FUSE_FLAGS)
- Wrap __clone2 declaration in extern "C" for ia64 path
- Update Makefile: empty SRC_C, build utils with $(CXX) instead of $(CC)
- Remove stale .c files now replaced by .cpp/.h counterparts
All binaries build cleanly: mergerfs, mergerfs-fusermount, mount.mergerfs
2 days ago
Antonio SJ Musumeci
793ce78f8a
Move fuse_session to C++ and make exit flag atomic
2 days ago
Antonio SJ Musumeci
3c0bbe7bed
Initialize stat buffer and add stat call in fuse_mount_sys
2 weeks ago
Antonio SJ Musumeci
cde19c0da2
Add NULL check for cmsg in receive_fd to prevent segfault
2 weeks ago
Antonio SJ Musumeci
04939bbe72
No longer explicitly error out on broken mount point
If ENOTCONN (broken FUSE mount) umount first and continue to mount.
2 weeks ago
Antonio SJ Musumeci
8f1ef59770
Move 3rd party libraries to "vendored" directory
3 weeks ago
Aaron Andersen
be4d388813
Add support for -n to not update mtab ( #1616 )
1 month ago
trapexit
41b65ae9e8
Misc cleanup for FreeBSD and clang ( #1560 )
5 months ago
trapexit
cfaad60275
Misc updates to arg parsing ( #1554 )
Ignore "defaults" and add a number of more modern VFS mount switches
5 months ago
trapexit
727c522fb8
Rework config, centralize fuse config ( #1547 )
5 months ago
trapexit
b18aba86b6
Build improvements ( #1501 )
* Remove python dependency
* Remove ecfd
* Improve makefiles
* Make preload.so more 32bit compatible
8 months ago
Antonio SJ Musumeci
d6a2f06797
Only set allow_other when running as root
2 years ago
Antonio SJ Musumeci
92ccfd3c89
Hard code setting of allow_other, ignore when set
3 years ago
Antonio SJ Musumeci
3ee93d4c56
Remove 'nonempty' argument
This makes it like all other filesystems and brings it into alignment
with libfuse3's behavior.
3 years ago
Antonio SJ Musumeci
43a6d66e3c
Major cleanup of libfuse to remove unneeded features
* Remove request interrupt code. Required tracking of all requests unnecesssarily.
* Remove all debugging printing. Have plans to do full replacement.
* Remove deprecated functions.
* Remove unneeded error checking.
* Remove "userdata" which was unused.
* Remove allow_root feature.
5 years ago
Antonio SJ Musumeci
3c761b708b
libfuse cleanup: remove libfuse API compatibility
6 years ago
Antonio SJ Musumeci
f9b831eb1a
libfuse cleanup: reindent
6 years ago
Antonio SJ Musumeci
5ce428ca59
rework makefiles + install mount tools
6 years ago
Antonio SJ Musumeci
95c0cc741d
replace libfuse's autoconf with makefile
7 years ago
Antonio SJ Musumeci
de0985c135
add libfuse 2.9.7 to repo and build against libfuse.a
10 years ago