diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-07-07 15:25:41 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-07-08 12:48:08 +0200 |
commit | e870a0427adb50a64dc8bcbacfacb089872c6908 (patch) | |
tree | 454e310cc66d048ee2e45493b6abaafcb80d1749 /lib/helper.c | |
parent | 79b446d22ce8cfb387549bef2a0ddcaf6fbb3331 (diff) |
Added public fuse_lib_help(), bumped minor version
Diffstat (limited to 'lib/helper.c')
-rw-r--r-- | lib/helper.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/helper.c b/lib/helper.c index 31640b6..5032b68 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -272,18 +272,15 @@ int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op, goto out1; } - /* Re-add --help for later processing by fuse_new() - (that way we also get help for modules options) */ if (opts.show_help) { 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; - goto out1; - } + fuse_lib_help(&args); + res = 0; + goto out1; } if (!opts.show_help && @@ -294,10 +291,9 @@ int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op, } - /* --help is processed here and will result in NULL */ fuse = fuse_new(&args, op, op_size, user_data); if (fuse == NULL) { - res = opts.show_help ? 0 : 1; + res = 1; goto out1; } |