| 636 | " profile <pipe_profile_id>\n"; |
| 637 | |
| 638 | static void |
| 639 | cmd_tmgr_subport_pipe(char **tokens, |
| 640 | uint32_t n_tokens, |
| 641 | char *out, |
| 642 | size_t out_size) |
| 643 | { |
| 644 | uint32_t subport_id, pipe_id_first, pipe_id_last, pipe_profile_id; |
| 645 | int status; |
| 646 | char *name; |
| 647 | |
| 648 | if (n_tokens != 11) { |
| 649 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 650 | return; |
| 651 | } |
| 652 | |
| 653 | name = tokens[1]; |
| 654 | |
| 655 | if (parser_read_uint32(&subport_id, tokens[3]) != 0) { |
| 656 | snprintf(out, out_size, MSG_ARG_INVALID, "subport_id"); |
| 657 | return; |
| 658 | } |
| 659 | |
| 660 | if (strcmp(tokens[4], "pipe") != 0) { |
| 661 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pipe"); |
| 662 | return; |
| 663 | } |
| 664 | |
| 665 | if (strcmp(tokens[5], "from") != 0) { |
| 666 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "from"); |
| 667 | return; |
| 668 | } |
| 669 | |
| 670 | if (parser_read_uint32(&pipe_id_first, tokens[6]) != 0) { |
| 671 | snprintf(out, out_size, MSG_ARG_INVALID, "pipe_id_first"); |
| 672 | return; |
| 673 | } |
| 674 | |
| 675 | if (strcmp(tokens[7], "to") != 0) { |
| 676 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "to"); |
| 677 | return; |
| 678 | } |
| 679 | |
| 680 | if (parser_read_uint32(&pipe_id_last, tokens[8]) != 0) { |
| 681 | snprintf(out, out_size, MSG_ARG_INVALID, "pipe_id_last"); |
| 682 | return; |
| 683 | } |
| 684 | |
| 685 | if (strcmp(tokens[9], "profile") != 0) { |
| 686 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "profile"); |
| 687 | return; |
| 688 | } |
| 689 | |
| 690 | if (parser_read_uint32(&pipe_profile_id, tokens[10]) != 0) { |
| 691 | snprintf(out, out_size, MSG_ARG_INVALID, "pipe_profile_id"); |
| 692 | return; |
| 693 | } |
| 694 | |
| 695 | status = tmgr_pipe_config(name, subport_id, pipe_id_first, |
no test coverage detected