| 5896 | "thread <thread_id> pipeline <pipeline_name> disable\n"; |
| 5897 | |
| 5898 | static void |
| 5899 | cmd_thread_pipeline_disable(char **tokens, |
| 5900 | uint32_t n_tokens, |
| 5901 | char *out, |
| 5902 | size_t out_size) |
| 5903 | { |
| 5904 | char *pipeline_name; |
| 5905 | uint32_t thread_id; |
| 5906 | int status; |
| 5907 | |
| 5908 | if (n_tokens != 5) { |
| 5909 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 5910 | return; |
| 5911 | } |
| 5912 | |
| 5913 | if (parser_read_uint32(&thread_id, tokens[1]) != 0) { |
| 5914 | snprintf(out, out_size, MSG_ARG_INVALID, "thread_id"); |
| 5915 | return; |
| 5916 | } |
| 5917 | |
| 5918 | if (strcmp(tokens[2], "pipeline") != 0) { |
| 5919 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pipeline"); |
| 5920 | return; |
| 5921 | } |
| 5922 | |
| 5923 | pipeline_name = tokens[3]; |
| 5924 | |
| 5925 | if (strcmp(tokens[4], "disable") != 0) { |
| 5926 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "disable"); |
| 5927 | return; |
| 5928 | } |
| 5929 | |
| 5930 | status = thread_pipeline_disable(thread_id, pipeline_name); |
| 5931 | if (status) { |
| 5932 | snprintf(out, out_size, MSG_CMD_FAIL, |
| 5933 | "thread pipeline disable"); |
| 5934 | return; |
| 5935 | } |
| 5936 | } |
| 5937 | |
| 5938 | static void |
| 5939 | cmd_help(char **tokens, uint32_t n_tokens, char *out, size_t out_size) |
no test coverage detected