cmd/sharefs: rename fuse-helper to fuse-operations
All checks were successful
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 2m34s
Test / Hakurei (push) Successful in 3m26s
Test / ShareFS (push) Successful in 3m23s
Test / Hpkg (push) Successful in 4m23s
Test / Sandbox (race detector) (push) Successful in 4m38s
Test / Hakurei (race detector) (push) Successful in 5m33s
Test / Flake checks (push) Successful in 1m45s

This is not really just library wrapper functions, but instead implements the callbacks, so fuse-operations makes more sense.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-26 03:19:32 +09:00
parent 056f5b12d4
commit d597592e1f
4 changed files with 6 additions and 7 deletions

View File

@@ -9,7 +9,7 @@
/* TODO(ophestra): remove after 05ce67fea99ca09cd4b6625cff7aec9cc222dd5a reaches a release */ /* TODO(ophestra): remove after 05ce67fea99ca09cd4b6625cff7aec9cc222dd5a reaches a release */
#include <sys/syscall.h> #include <sys/syscall.h>
#include "fuse-helper.h" #include "fuse-operations.h"
/* MUST_TRANSLATE_PATHNAME translates a userspace pathname to a relative pathname; /* MUST_TRANSLATE_PATHNAME translates a userspace pathname to a relative pathname;
* the resulting address points to a constant string or part of pathname, it is never heap allocated. */ * the resulting address points to a constant string or part of pathname, it is never heap allocated. */

View File

@@ -3,12 +3,12 @@ package main
/* /*
#cgo pkg-config: --static fuse3 #cgo pkg-config: --static fuse3
#include "fuse-helper.h" #include "fuse-operations.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
extern void *sharefs_init(struct fuse_conn_info *conn, struct fuse_config *cfg); extern void *sharefs_init(struct fuse_conn_info *conn, struct fuse_config *cfg);
void sharefs_destroy(void *private_data); extern void sharefs_destroy(void *private_data);
typedef void (*closure)(); typedef void (*closure)();
static inline struct fuse_opt _FUSE_OPT_END() { return (struct fuse_opt)FUSE_OPT_END; }; static inline struct fuse_opt _FUSE_OPT_END() { return (struct fuse_opt)FUSE_OPT_END; };
@@ -202,6 +202,9 @@ func unsafeAddArgument(args *fuseArgs, arg string) {
} }
func _main(argc int, argv **C.char) int { func _main(argc int, argv **C.char) int {
// don't mask creation mode, kernel already did that
syscall.Umask(0)
args := C.struct_fuse_args{argc: C.int(argc), argv: argv, allocated: 1} args := C.struct_fuse_args{argc: C.int(argc), argv: argv, allocated: 1}
// this causes the kernel to enforce access control based on // this causes the kernel to enforce access control based on

View File

@@ -5,7 +5,6 @@ import (
"os" "os"
"path" "path"
"runtime" "runtime"
"syscall"
) )
// executableName is the [path.Base] name of the executable that started the current process. // executableName is the [path.Base] name of the executable that started the current process.
@@ -24,8 +23,5 @@ func main() {
log.SetFlags(0) log.SetFlags(0)
log.SetPrefix(executableName + ": ") log.SetPrefix(executableName + ": ")
// don't mask creation mode, kernel already did that
syscall.Umask(0)
os.Exit(_main(len(os.Args), copyStrings(os.Args...))) os.Exit(_main(len(os.Args), copyStrings(os.Args...)))
} }