| 596 | " profile <subport_profile_id>\n"; |
| 597 | |
| 598 | static void |
| 599 | cmd_tmgr_subport(char **tokens, |
| 600 | uint32_t n_tokens, |
| 601 | char *out, |
| 602 | size_t out_size) |
| 603 | { |
| 604 | uint32_t subport_id, subport_profile_id; |
| 605 | int status; |
| 606 | char *name; |
| 607 | |
| 608 | if (n_tokens != 6) { |
| 609 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 610 | return; |
| 611 | } |
| 612 | |
| 613 | name = tokens[1]; |
| 614 | |
| 615 | if (parser_read_uint32(&subport_id, tokens[3]) != 0) { |
| 616 | snprintf(out, out_size, MSG_ARG_INVALID, "subport_id"); |
| 617 | return; |
| 618 | } |
| 619 | |
| 620 | if (parser_read_uint32(&subport_profile_id, tokens[5]) != 0) { |
| 621 | snprintf(out, out_size, MSG_ARG_INVALID, "subport_profile_id"); |
| 622 | return; |
| 623 | } |
| 624 | |
| 625 | status = tmgr_subport_config(name, subport_id, subport_profile_id); |
| 626 | if (status) { |
| 627 | snprintf(out, out_size, MSG_CMD_FAIL, tokens[0]); |
| 628 | return; |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | |
| 633 | static const char cmd_tmgr_subport_pipe_help[] = |
no test coverage detected