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

Function cli_process

dpdk/app/graph/cli.c:74–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void
75cli_process(char *in, char *out, size_t out_size, __rte_unused void *obj)
76{
77 int rc;
78
79 if (is_comment(in))
80 return;
81
82 rc = cmdline_parse(cl, in);
83 if (rc == CMDLINE_PARSE_AMBIGUOUS)
84 snprintf(out, out_size, MSG_CMD_FAIL, "Ambiguous command");
85 else if (rc == CMDLINE_PARSE_NOMATCH)
86 snprintf(out, out_size, MSG_CMD_FAIL, "Command mismatch");
87 else if (rc == CMDLINE_PARSE_BAD_ARGS)
88 snprintf(out, out_size, MSG_CMD_FAIL, "Bad arguments");
89
90 return;
91
92}
93
94int
95cli_script_process(const char *file_name, size_t msg_in_len_max, size_t msg_out_len_max, void *obj)

Callers 1

cli_script_processFunction · 0.70

Calls 3

cmdline_parseFunction · 0.85
snprintfFunction · 0.85
is_commentFunction · 0.70

Tested by

no test coverage detected