aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-15 19:46:57 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-15 19:46:57 -0700
commitb16650830d69cbe2d13e74c4318757c15f2c552f (patch)
treeeb2972d1d46aeed0bba411a02b8f523c7e21a8c2 /lib
parentb46250c40e29a23d37fe8fdadd6ef0d4cfe8b897 (diff)
Make --help output more suitable for end-user
We now only list options that are potentially useful for an end-user (and unlikely to accidentally break a file system). The full list of FUSE options has been moved to the documentation of the fuse_new() and fuse_session_new() functions.
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse.c14
-rw-r--r--lib/fuse_lowlevel.c6
-rw-r--r--lib/helper.c6
-rw-r--r--lib/mount.c9
-rw-r--r--lib/mount_bsd.c2
5 files changed, 16 insertions, 21 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index 826de4e..07e63d2 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -4414,12 +4414,9 @@ static const struct fuse_opt fuse_lib_opts[] = {
static void fuse_lib_help(void)
{
+ /* These are not all options, but only the ones that
+ may be of interest to an end-user */
printf(
-"High-level options\n"
-" -o hard_remove immediate removal (don't hide files)\n"
-" -o use_ino let filesystem set inode numbers\n"
-" -o readdir_ino try to fill in d_ino in readdir\n"
-" -o direct_io use direct I/O\n"
" -o kernel_cache cache files in kernel\n"
" -o [no]auto_cache enable caching based on modification times (off)\n"
" -o umask=M set file permissions (octal)\n"
@@ -4431,10 +4428,7 @@ static void fuse_lib_help(void)
" -o ac_attr_timeout=T auto cache timeout for attributes (attr_timeout)\n"
" -o noforget never forget cached inodes\n"
" -o remember=T remember cached inodes for T seconds (0s)\n"
-" -o intr allow requests to be interrupted\n"
-" -o intr_signal=NUM signal to send on interrupt (%i)\n"
-" -o modules=M1[:M2...] names of modules to push onto filesystem stack\n\n",
- FUSE_DEFAULT_INTR_SIGNAL);
+" -o modules=M1[:M2...] names of modules to push onto filesystem stack\n");
}
static void fuse_lib_help_modules(void)
@@ -4610,7 +4604,7 @@ struct fuse *fuse_new(struct fuse_args *args,
if (f->conf.show_help) {
fuse_lib_help();
- fuse_mount_help();
+ fuse_lowlevel_help();
/* Defer printing module help until modules
have been loaded */
}
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 736cec6..92e0ea3 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2531,6 +2531,12 @@ void fuse_lowlevel_version(void)
{
printf("using FUSE kernel interface version %i.%i\n",
FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
+ fuse_mount_version();
+}
+
+void fuse_lowlevel_help(void)
+{
+ fuse_mount_help();
}
void fuse_session_destroy(struct fuse_session *se)
diff --git a/lib/helper.c b/lib/helper.c
index 6044bb3..6d72802 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -114,14 +114,13 @@ static const struct fuse_opt conn_info_opt_spec[] = {
void fuse_cmdline_help(void)
{
- printf("General options:\n"
- " -h --help print help\n"
+ printf(" -h --help print help\n"
" -V --version print version\n"
" -d -o debug enable debug output (implies -f)\n"
" -f foreground operation\n"
" -s disable multi-threaded operation\n"
" -o clone_fd use separate fuse device fd for each thread\n"
- "\n");
+ " (may improve performance)\n");
}
static int fuse_helper_opt_proc(void *data, const char *arg, int key,
@@ -270,6 +269,7 @@ int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
if(args.argv[0] != '\0')
printf("usage: %s [options] <mountpoint>\n\n",
args.argv[0]);
+ printf("FUSE options:\n");
fuse_cmdline_help();
if (fuse_opt_add_arg(&args, "--help") == -1) {
res = 1;
diff --git a/lib/mount.c b/lib/mount.c
index faac1ea..c00367f 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -117,15 +117,12 @@ static const struct fuse_opt fuse_mount_opts[] = {
void fuse_mount_help(void)
{
+ /* These are not all options, but the ones that are
+ potentially of interest to an end-user */
printf(
-"FUSE-specific mount options:\n"
" -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"
-" -o default_permissions enable permission checking by kernel\n"
-" -o fsname=NAME set filesystem name\n"
-" -o subtype=NAME set filesystem type\n"
-" -o max_read=N set maximum size of read requests\n\n");
+" -o auto_unmount auto unmount on process termination\n");
}
static void exec_fusermount(const char *argv[])
diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c
index dc05506..c39414b 100644
--- a/lib/mount_bsd.c
+++ b/lib/mount_bsd.c
@@ -96,10 +96,8 @@ static const struct fuse_opt fuse_mount_opts[] = {
void fuse_mount_help(void)
{
printf(
-"FUSE-specific mount options:\n"
" -o allow_root allow access to root\n");
system(FUSERMOUNT_PROG " --help");
- fputc('\n', stderr);
}
void fuse_mount_version(void)