From: Nikolaus Rath Date: Sun, 16 Oct 2016 21:28:47 +0000 (-0700) Subject: Inlined fuse_mount_help() into fuse_lowlevel_help(). X-Git-Tag: fuse-3.0.0rc1~33 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=199fc0f8335af5487edb243c05a662b60e311463;p=qemu-gpiodev%2Flibfuse.git Inlined fuse_mount_help() into fuse_lowlevel_help(). Both the BSD and Linux implementation actually accept mostly the same FUSE-specific mount options. Up to now, the BSD help function appended the output of ``mount_fusefs --help``, but looking at http://www.unix.com/man-page/freebsd/8/mount_fusefs/ this is likely more confusing than helpful (since the user is not actually invoking mount_fusefs directly, most of the options don't make sense). --- diff --git a/lib/fuse_i.h b/lib/fuse_i.h index e612b3f..50962e3 100644 --- a/lib/fuse_i.h +++ b/lib/fuse_i.h @@ -107,9 +107,7 @@ void fuse_chan_put(struct fuse_chan *ch); struct mount_opts *parse_mount_opts(struct fuse_args *args); void destroy_mount_opts(struct mount_opts *mo); -void fuse_mount_help(void); void fuse_mount_version(void); - void fuse_kern_unmount(const char *mountpoint, int fd); int fuse_kern_mount(const char *mountpoint, struct mount_opts *mo); diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index fc37a24..86940eb 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2537,7 +2537,12 @@ void fuse_lowlevel_version(void) void fuse_lowlevel_help(void) { - fuse_mount_help(); + /* These are not all options, but the ones that are + potentially of interest to an end-user */ + printf( +" -o allow_other allow access to other users\n" +" -o allow_root allow access to root\n" +" -o auto_unmount auto unmount on process termination\n"); } void fuse_session_destroy(struct fuse_session *se) diff --git a/lib/helper.c b/lib/helper.c index 6d72802..cc1002d 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -258,7 +258,6 @@ int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op, if (opts.show_version) { printf("FUSE library version %s\n", PACKAGE_VERSION); fuse_lowlevel_version(); - fuse_mount_version(); res = 0; goto out1; } diff --git a/lib/mount.c b/lib/mount.c index c00367f..051b424 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -115,16 +115,6 @@ static const struct fuse_opt fuse_mount_opts[] = { FUSE_OPT_END }; -void fuse_mount_help(void) -{ - /* These are not all options, but the ones that are - potentially of interest to an end-user */ - printf( -" -o allow_other allow access to other users\n" -" -o allow_root allow access to root\n" -" -o auto_unmount auto unmount on process termination\n"); -} - static void exec_fusermount(const char *argv[]) { execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv); diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c index c39414b..9cf9dfa 100644 --- a/lib/mount_bsd.c +++ b/lib/mount_bsd.c @@ -93,13 +93,6 @@ static const struct fuse_opt fuse_mount_opts[] = { FUSE_OPT_END }; -void fuse_mount_help(void) -{ - printf( -" -o allow_root allow access to root\n"); - system(FUSERMOUNT_PROG " --help"); -} - void fuse_mount_version(void) { system(FUSERMOUNT_PROG " --version");