[cli] always output command result (#4556)

Always output command result, i.e. "Done" on success, error message
otherwise.

Factory commands also follow the same pattern. Their existing error
messages are not removed for backward compatibility consideration.
This commit is contained in:
Yakun Xu
2020-02-19 11:44:42 -08:00
committed by GitHub
parent c8dff09d3a
commit aa62fd8f65
22 changed files with 129 additions and 183 deletions
+4 -2
View File
@@ -145,7 +145,7 @@ bool otDiagIsEnabled(otInstance *aInstance)
return false;
}
void otDiagProcessCmd(otInstance *aInstance, int aArgCount, char *aArgVector[], char *aOutput, size_t aOutputMaxLen)
otError otDiagProcessCmd(otInstance *aInstance, int aArgCount, char *aArgVector[], char *aOutput, size_t aOutputMaxLen)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aArgCount);
@@ -447,13 +447,15 @@ otError otPlatUartFlush(void)
return OT_ERROR_NOT_IMPLEMENTED;
}
void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOutput, size_t aOutputMaxLen)
otError otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOutput, size_t aOutputMaxLen)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(argc);
OT_UNUSED_VARIABLE(argv);
OT_UNUSED_VARIABLE(aOutput);
OT_UNUSED_VARIABLE(aOutputMaxLen);
return OT_ERROR_INVALID_ARGS;
}
void otPlatDiagModeSet(bool aMode)