diff options
Diffstat (limited to 'example/timefs2.c')
-rw-r--r-- | example/timefs2.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/example/timefs2.c b/example/timefs2.c index 3194230..ea10cc1 100644 --- a/example/timefs2.c +++ b/example/timefs2.c @@ -319,6 +319,15 @@ static void* update_fs(void *data) { return NULL; } +static void show_help(const char *progname) +{ + printf("usage: %s [options] <mountpoint>\n\n", progname); + printf("File-system specific options:\n" + " --update-interval=<secs> Update-rate of file system contents\n" + " --no-notify Disable kernel notifications\n" + "\n"); +} + int main(int argc, char *argv[]) { struct fuse_args args = FUSE_ARGS_INIT(argc, argv); struct fuse_session *se; @@ -332,8 +341,18 @@ int main(int argc, char *argv[]) { if (fuse_parse_cmdline(&args, &opts) != 0) return 1; - if (opts.show_help || opts.show_version) { - ret = 1; + if (opts.show_help) { + show_help(argv[0]); + fuse_cmdline_help(); + fuse_lowlevel_help(); + fuse_mount_help(); + ret = 0; + goto err_out1; + } else if (opts.show_version) { + printf("FUSE library version %s\n", fuse_pkgversion()); + fuse_lowlevel_version(); + fuse_mount_version(); + ret = 0; goto err_out1; } |