From eb8c6d90bdf08c2e44db454dfee87dd66f31da33 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Thu, 10 Jan 2019 01:43:14 +0800 Subject: [PATCH] [diag] quick fix to support long output (#3436) `Cli::Uart::OutputFormat()` current only supports output `OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH` bytes, which isn't enough for command *diag* by default. This PR removes that restriction by using `Cli::Uart::Output`. I think this is just a quick fix, an overall enhancement of Cli is needed so that we can use small stack size but also get better performance. --- src/cli/cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 7475893c3..d334635bf 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -3742,7 +3742,7 @@ void Interpreter::ProcessDiag(int argc, char *argv[]) // all diagnostics related features are processed within diagnostics module output[sizeof(output) - 1] = '\0'; otDiagProcessCmd(argc, argv, output, sizeof(output) - 1); - mServer->OutputFormat("%s\n", output); + mServer->Output(output, static_cast(strlen(output))); } #endif