[diags] use temporary buffer for diag output (#2992)

This commit is contained in:
Shu Chen
2018-08-28 09:24:23 -07:00
committed by Jonathan Hui
parent 2f605e9953
commit 026badad96
7 changed files with 70 additions and 75 deletions
+9 -9
View File
@@ -62,23 +62,23 @@ void otDiagInit(otInstance *aInstance);
/**
* This function processes a factory diagnostics command line.
*
* @param[in] aArgCount The argument counter of diagnostics command line.
* @param[in] aArgVector The argument vector of diagnostics command line.
*
* @returns A pointer to the output string.
* @param[in] aArgCount The argument counter of diagnostics command line.
* @param[in] aArgVector The argument vector of diagnostics command line.
* @param[out] aOutput The diagnostics execution result.
* @param[in] aOutputMaxLen The output buffer size.
*
*/
const char *otDiagProcessCmd(int aArgCount, char *aArgVector[]);
void otDiagProcessCmd(int aArgCount, char *aArgVector[], char *aOutput, size_t aOutputMaxLen);
/**
* This function processes a factory diagnostics command line.
*
* @param[in] aString A NULL-terminated input string.
*
* @returns A pointer to the output string.
* @param[in] aString A NULL-terminated input string.
* @param[out] aOutput The diagnostics execution result.
* @param[in] aOutputMaxLen The output buffer size.
*
*/
const char *otDiagProcessCmdLine(const char *aString);
void otDiagProcessCmdLine(const char *aString, char *aOutput, size_t aOutputMaxLen);
/**
* This function indicates whether or not the factory diagnostics mode is enabled.