MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_token

Function get_token

dpdk/lib/cmdline/cmdline_parse.c:82–94  ·  view source on GitHub ↗

Retrieve either static or dynamic token at a given index. */

Source from the content-addressed store, hash-verified

80
81/** Retrieve either static or dynamic token at a given index. */
82static cmdline_parse_token_hdr_t *
83get_token(cmdline_parse_inst_t *inst, unsigned int index)
84{
85 cmdline_parse_token_hdr_t *token_p;
86
87 /* check presence of static tokens first */
88 if (inst->tokens[0] || !inst->f)
89 return inst->tokens[index];
90 /* generate dynamic token */
91 token_p = NULL;
92 inst->f(&token_p, NULL, &inst->tokens[index]);
93 return token_p;
94}
95
96/**
97 * try to match the buffer with an instruction (only the first

Callers 2

match_instFunction · 0.70
cmdline_completeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected