diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-10 09:38:20 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-10 09:41:17 -0700 |
commit | b69192b629a454f35eebe23d9ac4f8a5773170fd (patch) | |
tree | 9225e445a0fac5eb6566b7d383180dfae6013652 /lib/helper.c | |
parent | 10e718b8ca78c4e332df9d342cd662bfe3fd2bb5 (diff) |
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.
Diffstat (limited to 'lib/helper.c')
-rw-r--r-- | lib/helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
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] <mountpoint>\n\n", + args.argv[0]); fuse_cmdline_help(); if (fuse_opt_add_arg(&args, "--help") == -1) { res = 1; |