Lines Matching defs:opt
24 const struct fuse_opt *opt;
100 static int next_arg(struct fuse_opt_context *ctx, const char *opt)
103 fuse_log(FUSE_LOG_ERR, "fuse: missing argument after `%s'\n", opt);
115 static int add_opt_common(char **opts, const char *opt, int esc)
118 char *d = realloc(*opts, oldlen + 1 + strlen(opt) * 2 + 1);
129 for (; *opt; opt++) {
130 if (esc && (*opt == ',' || *opt == '\\'))
132 *d++ = *opt;
139 int fuse_opt_add_opt(char **opts, const char *opt)
141 return add_opt_common(opts, opt, 0);
144 int fuse_opt_add_opt_escaped(char **opts, const char *opt)
146 return add_opt_common(opts, opt, 1);
149 static int add_opt(struct fuse_opt_context *ctx, const char *opt)
151 return add_opt_common(&ctx->opts, opt, 1);
192 static const struct fuse_opt *find_opt(const struct fuse_opt *opt,
195 for (; opt && opt->templ; opt++)
196 if (match_template(opt->templ, arg, sepp))
197 return opt;
201 int fuse_opt_match(const struct fuse_opt *opts, const char *opt)
204 return find_opt(opts, opt, &dummy) ? 1 : 0;
229 const struct fuse_opt *opt, unsigned sep,
232 if (opt->offset == -1U) {
233 if (call_proc(ctx, arg, opt->value, iso) == -1)
236 void *var = (char *)ctx->data + opt->offset;
237 if (sep && opt->templ[sep + 1]) {
239 if (opt->templ[sep] == '=')
241 if (process_opt_param(var, opt->templ + sep + 1,
245 *(int *)var = opt->value;
251 const struct fuse_opt *opt, unsigned sep,
268 res = process_opt(ctx, opt, sep, newarg, iso);
277 const struct fuse_opt *opt = find_opt(ctx->opt, arg, &sep);
278 if (opt) {
279 for (; opt; opt = find_opt(opt + 1, arg, &sep)) {
281 if (sep && opt->templ[sep] == ' ' && !arg[sep])
282 res = process_opt_sep_arg(ctx, opt, sep, arg,
285 res = process_opt(ctx, opt, sep, arg, iso);
404 .opt = opts,