Lines Matching defs:opt
19 const struct fuse_opt *opt;
84 static int next_arg(struct fuse_opt_context *ctx, const char *opt)
87 fprintf(stderr, "fuse: missing argument after `%s'\n", opt);
99 int fuse_opt_add_opt(char **opts, const char *opt)
103 newopts = strdup(opt);
106 newopts = realloc(*opts, oldlen + 1 + strlen(opt) + 1);
109 strcpy(newopts + oldlen + 1, opt);
119 static int add_opt(struct fuse_opt_context *ctx, const char *opt)
121 return fuse_opt_add_opt(&ctx->opts, opt);
162 static const struct fuse_opt *find_opt(const struct fuse_opt *opt,
165 for (; opt && opt->templ; opt++)
166 if (match_template(opt->templ, arg, sepp))
167 return opt;
171 int fuse_opt_match(const struct fuse_opt *opts, const char *opt)
174 return find_opt(opts, opt, &dummy) ? 1 : 0;
197 const struct fuse_opt *opt, unsigned sep,
200 if (opt->offset == -1U) {
201 if (call_proc(ctx, arg, opt->value, iso) == -1)
204 void *var = (char *)ctx->data + opt->offset;
205 if (sep && opt->templ[sep + 1]) {
207 if (opt->templ[sep] == '=')
209 if (process_opt_param(var, opt->templ + sep + 1,
213 *(int *)var = opt->value;
219 const struct fuse_opt *opt, unsigned sep,
236 res = process_opt(ctx, opt, sep, newarg, iso);
245 const struct fuse_opt *opt = find_opt(ctx->opt, arg, &sep);
246 if (opt) {
247 for (; opt; opt = find_opt(opt + 1, arg, &sep)) {
249 if (sep && opt->templ[sep] == ' ' && !arg[sep])
250 res = process_opt_sep_arg(ctx, opt, sep, arg, iso);
252 res = process_opt(ctx, opt, sep, arg, iso);
363 .opt = opts,