diff --git a/libfuse-lite/mount.c b/libfuse-lite/mount.c index 64adee7d..6ae29d8c 100644 --- a/libfuse-lite/mount.c +++ b/libfuse-lite/mount.c @@ -670,11 +670,10 @@ int fuse_kern_mount(const char *mountpoint, struct fuse_args *args) fprintf(stderr, "fuse: 'allow_other' and 'allow_root' options are mutually exclusive\n"); goto out; } - res = 0; + res = -1; if (mo.ishelp) goto out; - res = -1; if (get_mnt_flag_opts(&mnt_opts, mo.flags) == -1) goto out; #ifndef __SOLARIS__ diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index 7e3e93d2..29021dfc 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -128,6 +128,10 @@ const struct DEFOPTION optionlist[] = { { "efs_raw", OPT_EFS_RAW, FLGOPT_BOGUS }, { "posix_nlink", OPT_POSIX_NLINK, FLGOPT_BOGUS }, { "special_files", OPT_SPECIAL_FILES, FLGOPT_STRING }, + { "--help", OPT_HELP, FLGOPT_BOGUS }, + { "-h", OPT_HELP, FLGOPT_BOGUS }, + { "--version", OPT_VERSION, FLGOPT_BOGUS }, + { "-V", OPT_VERSION, FLGOPT_BOGUS }, { (const char*)NULL, 0, 0 } /* end marker */ } ; @@ -521,6 +525,8 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx, * mounted or not. * (falling through to default) */ + case OPT_HELP : /* Could lead to unclean condition */ + case OPT_VERSION : /* Could lead to unclean condition */ default : ntfs_log_error("'%s' is an unsupported option.\n", poptl->name); diff --git a/src/ntfs-3g_common.h b/src/ntfs-3g_common.h index 4ed256a3..8ead5107 100644 --- a/src/ntfs-3g_common.h +++ b/src/ntfs-3g_common.h @@ -94,6 +94,8 @@ enum { OPT_EFS_RAW, OPT_POSIX_NLINK, OPT_SPECIAL_FILES, + OPT_HELP, + OPT_VERSION, } ; /* Option flags */