static int fuse_mount_opt_proc(void *data, const char *arg, int key,
                               struct fuse_args *outargs)
{
    struct mount_opts *mo = data;

    switch (key) {
    case KEY_ALLOW_ROOT:
        if (fuse_opt_add_opt(&mo->kernel_opts, "allow_other") == -1 ||
            fuse_opt_add_arg(outargs, "-oallow_root") == -1)
            return -1;
        return 0;

    case KEY_RO:
        arg = "ro";
        /* fall through */
    case KEY_KERN_FLAG:
        set_mount_flag(arg, &mo->flags);
        return 0;

    case KEY_KERN_OPT:
        return fuse_opt_add_opt(&mo->kernel_opts, arg);

    case KEY_FUSERMOUNT_OPT:
        return fuse_opt_add_opt(&mo->fusermount_opts, arg);

#ifdef __SOLARIS__
    case KEY_SUBTYPE_OPT:
        return fuse_opt_add_opt(&mo->subtype_opt, arg);
#endif /* __SOLARIS__ */

    case KEY_MTAB_OPT:
        return fuse_opt_add_opt(&mo->mtab_opts, arg);

    case KEY_HELP:
#ifdef __SOLARIS__
        mount_help();
#endif /* __SOLARIS__ */
        mo->ishelp = 1;
        break;

    case KEY_VERSION:
#ifdef __SOLARIS__
        mount_version();
#endif /* __SOLARIS__ */
        mo->ishelp = 1;
        break;
    }
    return 1;
}
static int fuse_mount_opt_proc(void *data, const char *arg, int key,
                               struct fuse_args *outargs)
{
    struct mount_opts *mo = data;

    switch (key) {
    case KEY_ALLOW_ROOT:
        if (fuse_opt_add_opt(&mo->kernel_opts, "allow_other") == -1 ||
            fuse_opt_add_arg(outargs, "-oallow_root") == -1)
            return -1;
        return 0;

    case KEY_RO:
        arg = "ro";
         
    case KEY_KERN_FLAG:
        set_mount_flag(arg, &mo->flags);
        return 0;

    case KEY_KERN_OPT:
        return fuse_opt_add_opt(&mo->kernel_opts, arg);

    case KEY_FUSERMOUNT_OPT:
        return fuse_opt_add_opt(&mo->fusermount_opts, arg);

#ifdef __SOLARIS__
    case KEY_SUBTYPE_OPT:
        return fuse_opt_add_opt(&mo->subtype_opt, arg);
#endif  

    case KEY_MTAB_OPT:
        return fuse_opt_add_opt(&mo->mtab_opts, arg);

    case KEY_HELP:
#ifdef __SOLARIS__
        mount_help();
#endif  
        mo->ishelp = 1;
        break;

    case KEY_VERSION:
#ifdef __SOLARIS__
        mount_version();
#endif  
        mo->ishelp = 1;
        break;
    }
    return 1;
}