Hi, The reference FUSE implementation defines fuse_opt_parse's third argument as const. At least fuse-zip[1] needs this. follow.
ok? [1] https://code.google.com/p/fuse-zip/ Index: fuse_opt.c =================================================================== RCS file: /cvs/src/lib/libfuse/fuse_opt.c,v retrieving revision 1.7 diff -u -p -r1.7 fuse_opt.c --- fuse_opt.c 4 Nov 2013 19:54:18 -0000 1.7 +++ fuse_opt.c 20 Jan 2014 20:23:57 -0000 @@ -218,8 +218,8 @@ fuse_opt_add_arg(struct fuse_args *args, } static int -parse_opt(struct fuse_opt *o, const char *val, void *data, fuse_opt_proc_t f, - struct fuse_args *arg) +parse_opt(const struct fuse_opt *o, const char *val, void *data, + fuse_opt_proc_t f, struct fuse_args *arg) { int ret; int found = 0; @@ -256,8 +256,8 @@ parse_opt(struct fuse_opt *o, const char * when f() returns 0 we need to discard the arg */ int -fuse_opt_parse(struct fuse_args *args, void *data, struct fuse_opt *opt, - fuse_opt_proc_t f) +fuse_opt_parse(struct fuse_args *args, void *data, + const struct fuse_opt *opt, fuse_opt_proc_t f) { struct fuse_args outargs = FUSE_ARGS_INIT(args->argc, args->argv); const char *arg; Index: fuse_opt.h =================================================================== RCS file: /cvs/src/lib/libfuse/fuse_opt.h,v retrieving revision 1.2 diff -u -p -r1.2 fuse_opt.h --- fuse_opt.h 11 Jul 2013 11:41:13 -0000 1.2 +++ fuse_opt.h 20 Jan 2014 20:20:16 -0000 @@ -41,7 +41,7 @@ void fuse_opt_free_args(struct fuse_args int fuse_opt_add_opt(char **, const char *); int fuse_opt_add_opt_escaped(char **, const char *); int fuse_opt_match(const struct fuse_opt *, const char *); -int fuse_opt_parse(struct fuse_args *, void *, struct fuse_opt *, +int fuse_opt_parse(struct fuse_args *, void *, const struct fuse_opt *, fuse_opt_proc_t); #define FUSE_ARGS_INIT(ac, av) { ac, av, 0 } -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE (previous: 0x06A11494 / 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494)