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

Function cmdline_read_from_file

dpdk/app/test-pmd/cmdline.c:13340–13359  ·  view source on GitHub ↗

read cmdline commands from file */

Source from the content-addressed store, hash-verified

13338
13339/* read cmdline commands from file */
13340void
13341cmdline_read_from_file(const char *filename)
13342{
13343 struct cmdline *cl;
13344
13345 cl = cmdline_file_new(main_ctx, "testpmd> ", filename);
13346 if (cl == NULL) {
13347 fprintf(stderr,
13348 "Failed to create file based cmdline context: %s\n",
13349 filename);
13350 return;
13351 }
13352
13353 cmdline_interact(cl);
13354 cmdline_quit(cl);
13355
13356 cmdline_free(cl);
13357
13358 printf("Read CLI commands from %s\n", filename);
13359}
13360
13361void
13362prompt_exit(void)

Callers 2

mainFunction · 0.85

Calls 5

cmdline_file_newFunction · 0.85
cmdline_interactFunction · 0.85
cmdline_quitFunction · 0.85
cmdline_freeFunction · 0.85
printfFunction · 0.50

Tested by 1

mainFunction · 0.68