From b69192b629a454f35eebe23d9ac4f8a5773170fd Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 10 Oct 2016 09:38:20 -0700 Subject: fuse_main(): extend support for printing help There's now a way to inhibit the "usage" line (which actually got lost in commit 225c12aebf2d), which makes it easier for simply file-systems to generate good-looking --help output. --- lib/helper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/helper.c') diff --git a/lib/helper.c b/lib/helper.c index c57edb1..cc5cefc 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -202,6 +202,9 @@ int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op, /* 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]); fuse_cmdline_help(); if (fuse_opt_add_arg(&args, "--help") == -1) { res = 1; -- cgit v1.2.3