cmd/sharefs: improve help message
All checks were successful
Test / Create distribution (push) Successful in 42s
Test / Sandbox (push) Successful in 2m20s
Test / Hakurei (push) Successful in 3m24s
Test / ShareFS (push) Successful in 3m23s
Test / Hpkg (push) Successful in 4m19s
Test / Sandbox (race detector) (push) Successful in 4m36s
Test / Hakurei (race detector) (push) Successful in 5m32s
Test / Flake checks (push) Successful in 1m52s

This improves consistency with the fuse_main help message.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-27 02:20:41 +09:00
parent 0e476c5e5b
commit a27305cb4a

View File

@@ -108,13 +108,17 @@ func sharefs_destroy(private_data unsafe.Pointer) {
} }
// showHelp prints the help message. // showHelp prints the help message.
func showHelp() { func showHelp(args *C.struct_fuse_args) {
fmt.Printf("usage: %s [options] <mountpoint>\n\n", executableName) fmt.Printf("usage: %s [options] <mountpoint>\n\n", executableName)
C.fuse_cmdline_help()
C.fuse_lowlevel_help() fmt.Println("Filesystem options:")
fmt.Println(" -o source=/data/media source directory to be mounted") fmt.Println(" -o source=/data/media source directory to be mounted")
fmt.Println(" -o setuid=1023 uid to run as when starting as root") fmt.Println(" -o setuid=1023 uid to run as when starting as root")
fmt.Println(" -o setgid=1023 gid to run as when starting as root") fmt.Println(" -o setgid=1023 gid to run as when starting as root")
fmt.Println("\nFUSE options:")
C.fuse_cmdline_help()
C.fuse_lib_help(args)
} }
// parseOpts parses fuse options via fuse_opt_parse. // parseOpts parses fuse options via fuse_opt_parse.
@@ -155,7 +159,7 @@ func parseOpts(args *C.struct_fuse_args) (
} }
if unsafeOpts.source == nil || *unsafeOpts.source == 0 { if unsafeOpts.source == nil || *unsafeOpts.source == 0 {
showHelp() showHelp(args)
ret = 1 ret = 1
return return
} else { } else {