From e870a0427adb50a64dc8bcbacfacb089872c6908 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Fri, 7 Jul 2017 15:25:41 +0200 Subject: Added public fuse_lib_help(), bumped minor version --- lib/helper.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/helper.c') 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] \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; } -- cgit v1.2.3