Skip to content

Commit

Permalink
add squashfuse_ll.1, reconcile help and man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDaveD committed Jun 30, 2023
1 parent 30470af commit 875ed52
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 14 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ squashfuse_ll_CPPFLAGS = $(ZLIB_CPPFLAGS) $(XZ_CPPFLAGS) $(LZO_CPPFLAGS) \
$(LZ4_CPPFLAGS) $(ZSTD_CPPFLAGS) $(FUSE_CPPFLAGS)
squashfuse_ll_LDADD = libsquashfuse_ll_convenience.la $(COMPRESSION_LIBS) $(FUSE_LIBS)

dist_man_MANS += squashfuse_ll.1
pkgconfig_DATA += squashfuse_ll.pc
pkginclude_HEADERS += ll.h
endif
Expand Down
35 changes: 24 additions & 11 deletions fuseprivate.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,36 @@ void sqfs_usage(char *progname, bool fuse_usage, bool ll_usage) {
fprintf(stderr, "Usage: %s [options] ARCHIVE MOUNTPOINT\n",
progname ? progname : PACKAGE_NAME);
fprintf(stderr, "\n%s options:\n", progname);
fprintf(stderr, " -o offset offset into ARCHIVE to mount\n");
fprintf(stderr, " -o timeout idle seconds for automatic unmount\n");
fprintf(stderr, " -o offset=N offset N bytes into ARCHIVE to mount\n");
if (ll_usage) {
fprintf(stderr, " -o uid=N set file owner\n");
fprintf(stderr, " -o gid=N set file group\n");
fprintf(stderr, " -o timeout=N idle N seconds for automatic unmount\n");
fprintf(stderr, " -o uid=N set file owner to uid N\n");
fprintf(stderr, " -o gid=N set file group to gid N\n");
}
if (fuse_usage) {
if (ll_usage) {
#if FUSE_USE_VERSION >= 30
fprintf(stderr, "\nFUSE options:\n");
fuse_cmdline_help();
fprintf(stderr, "\nFUSE options:\n");
fuse_cmdline_help();
#else
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
fuse_opt_add_arg(&args, ""); /* progname */
fuse_opt_add_arg(&args, "-ho");
fprintf(stderr, "\n");
fuse_parse_cmdline(&args, NULL, NULL, NULL);
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
fuse_opt_add_arg(&args, ""); /* progname */
fuse_opt_add_arg(&args, "-ho");
fprintf(stderr, "\n");
fuse_parse_cmdline(&args, NULL, NULL, NULL);
#endif
} else {
/* Standard FUSE help includes confusing
* multi-threaded options so don't use it
*/
fprintf(stderr, "\nSelection of FUSE options:\n");
fprintf(stderr," -h --help print help\n");
fprintf(stderr," -V --version print version\n");
fprintf(stderr," -d -o debug enable debug output (implies -f)\n");
fprintf(stderr," -f foreground operation\n");
fprintf(stderr," -o allow_other allow access by other users\n");
fprintf(stderr," -o allow_root allow access by the superuser\n");
}
}
exit(-2);
}
Expand Down
19 changes: 16 additions & 3 deletions squashfuse.1
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,25 @@ The filesystem can be unmounted using
.Xr umount 8
or
.Xr fusermount 8 .
The
.Nm
implementation is single-threaded.
.Pp
A selection of FUSE options:
Options supported by the
.Xr fuse 8
library are supported.
In addition the following option is supported:
.Bl -tag -width -indent
.It Fl o Cm offset=N
offset N bytes into archive to mount
.El
.Pp
Here is a selection of generally useful FUSE library options:
.Bl -tag -width -indent
.It Fl V, -version
show FUSE version
.It Fl h, -help
print help
.It Fl V, -version
show FUSE version
.It Fl d, o Cm debug
enable debug output (implies
.Fl f )
Expand All @@ -59,6 +71,7 @@ allow access by other users
allow access by the superuser
.El
.Sh SEE ALSO
.Xr fuse 8 ,
.Xr fusermount 8 ,
.Xr mount 8 ,
.Xr umount 8
Expand Down

0 comments on commit 875ed52

Please sign in to comment.