diff --git a/subsys/net/lib/openthread/platform/shell.c b/subsys/net/lib/openthread/platform/shell.c index e72fd34a6e6..cf34887a778 100644 --- a/subsys/net/lib/openthread/platform/shell.c +++ b/subsys/net/lib/openthread/platform/shell.c @@ -25,8 +25,19 @@ static bool is_shell_initialized; static int ot_console_cb(void *context, const char *format, va_list arg) { + char prompt_check[4]; + ARG_UNUSED(context); + /* A temporary workaround to avoid printing OT prompt in Zehyr shell. + * Eventually, OT should add an option which would allow to disable + * prompt on the CLI output. + */ + vsnprintf(prompt_check, sizeof(prompt_check), format, arg); + if (strcmp(prompt_check, "> ") == 0) { + return 0; + } + if (shell_p == NULL) { return 0; }