Lines Matching refs:pctx
411 struct nmreq_parse_ctx *pctx) in nmreq_option_parsekeys() argument
438 nmctx_ferror(pctx->ctx, "unknown key: '%s'", key); in nmreq_option_parsekeys()
442 if (pctx->keys[k->id] != NULL) { in nmreq_option_parsekeys()
443 nmctx_ferror(pctx->ctx, "option '%s': duplicate key '%s', already set to '%s'", in nmreq_option_parsekeys()
444 prefix, key, pctx->keys[k->id]); in nmreq_option_parsekeys()
456 pctx->keys[k->id] = (vlen ? value : NULL); in nmreq_option_parsekeys()
459 nmctx_ferror(pctx->ctx, "option '%s': missing '=value' for key '%s'", in nmreq_option_parsekeys()
464 pctx->keys[k->id] = key; in nmreq_option_parsekeys()
469 if ((k->flags & NMREQ_OPTK_MUSTSET) && pctx->keys[k->id] == NULL) { in nmreq_option_parsekeys()
470 nmctx_ferror(pctx->ctx, "option '%s': mandatory key '%s' not assigned", in nmreq_option_parsekeys()
488 struct nmreq_parse_ctx pctx; in nmreq_option_decode1() local
514 pctx.ctx = ctx; in nmreq_option_decode1()
515 pctx.token = token; in nmreq_option_decode1()
517 pctx.keys[i] = NULL; in nmreq_option_decode1()
540 pctx.keys[p->default_key] = scan; in nmreq_option_decode1()
543 if (nmreq_option_parsekeys(prefix, scan, p, &pctx) < 0) in nmreq_option_decode1()
547 return p->parse(&pctx); in nmreq_option_decode1()