Add section headings for --help output
authorNikolaus Rath <Nikolaus@rath.org>
Mon, 3 Oct 2016 03:42:33 +0000 (20:42 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Mon, 3 Oct 2016 03:51:15 +0000 (20:51 -0700)
Also, do not include "General options" in usage message.

lib/fuse.c
lib/fuse_lowlevel.c
lib/helper.c
lib/mount.c
lib/mount_bsd.c

index bd7dc27acb8676d9ff5dba58a022462ffab6e998..d5cc678892f2b641874a9e8bb8aa82e5aa819faf 100644 (file)
@@ -4453,6 +4453,7 @@ static const struct fuse_opt fuse_lib_opts[] = {
 static void fuse_lib_help(void)
 {
        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"
@@ -4471,8 +4472,8 @@ static void fuse_lib_help(void)
 "    -o nopath              don't supply path if not necessary\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\n",
+              FUSE_DEFAULT_INTR_SIGNAL);
 }
 
 static void fuse_lib_help_modules(void)
index 43539da296c8f1d7e83a9ebdbfd5d811c2aac547..8682c315aa5e5e553b266297d97294f00c399da1 100755 (executable)
@@ -2639,6 +2639,7 @@ static void fuse_ll_version(void)
 static void fuse_ll_help(void)
 {
        printf(
+"Low-level options\n"
 "    -o max_write=N         set maximum size of write requests\n"
 "    -o max_readahead=N     set maximum readahead\n"
 "    -o max_background=N    set number of maximum background requests\n"
@@ -2658,8 +2659,7 @@ static void fuse_ll_help(void)
 "    -o [no_]async_dio        asynchronous direct I/O\n"
 "    -o [no_]writeback_cache  asynchronous, buffered writes\n"
 "    -o time_gran=N           time granularity in nsec\n"
-"    -o clone_fd              clone fuse device file descriptors\n"
-);
+"    -o clone_fd              clone fuse device file descriptors\n\n");
 }
 
 static int fuse_ll_opt_proc(void *data, const char *arg, int key,
index 7ee767baf7b25f4b68bc7b547b646aaf0b9a10ef..309c0963278a01edfeca8eb85e64a0d54601dc88 100644 (file)
@@ -59,16 +59,13 @@ static const struct fuse_opt fuse_helper_opts[] = {
 static void usage(const char *progname)
 {
        printf("usage: %s mountpoint [options]\n\n", progname);
-       printf("general options:\n"
-              "    -o opt,[opt...]        mount options\n"
-              "    -h   --help            print help\n"
-              "    -V   --version         print version\n"
-              "\n");
 }
 
 static void helper_help(void)
 {
-       printf("FUSE options:\n"
+       printf("General options:\n"
+              "    -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"
index fb17c0021db037618ec3e0977b8f8bf336041bb2..d7f4bddd33038291962e2de76344465d88ad2e48 100644 (file)
@@ -121,6 +121,7 @@ static const struct fuse_opt fuse_mount_opts[] = {
 void fuse_mount_help(void)
 {
        printf(
+"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"
@@ -129,8 +130,7 @@ void fuse_mount_help(void)
 "    -o fsname=NAME         set filesystem name\n"
 "    -o subtype=NAME        set filesystem type\n"
 "    -o large_read          issue large read requests (2.4 only)\n"
-"    -o max_read=N          set maximum size of read requests\n"
-"\n");
+"    -o max_read=N          set maximum size of read requests\n\n");
 }
 
 static void exec_fusermount(const char *argv[])
index 0d886b0a7a532b3249fb6f9fc71f7575833fc4d9..4dce8c4ded167fcf6b262f2c1425570a1d08b779 100644 (file)
@@ -95,7 +95,9 @@ static const struct fuse_opt fuse_mount_opts[] = {
 
 void fuse_mount_help(void)
 {
-       printf("    -o allow_root          allow access to root\n");
+       printf(
+"Mount options:\n"
+"    -o allow_root          allow access to root\n");
        system(FUSERMOUNT_PROG " --help");
        fputc('\n', stderr);
 }