read cmdline commands from file */
| 13338 | |
| 13339 | /* read cmdline commands from file */ |
| 13340 | void |
| 13341 | cmdline_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 | |
| 13361 | void |
| 13362 | prompt_exit(void) |