nrf52_bsim: Fix: shell return code should be != 0 on ASSERT
When calling posix_print_error_and_exit() a return != 0 was not provided to the shell This was due to thee way the tracing functions call back into the main app exit function, assuming that callback will return. But in the SOC_INF boards, that function does not return, and the tracing functions never have the chance to exit(!=0) Fix it by calling posix_exit() in the wrap function instead. Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
64d6d1079c
commit
48590fa89f
1 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include "bs_tracing.h"
|
#include "bs_tracing.h"
|
||||||
|
#include "posix_board_if.h"
|
||||||
|
|
||||||
#define _STDOUT_BUF_SIZE 256
|
#define _STDOUT_BUF_SIZE 256
|
||||||
static char stdout_buff[_STDOUT_BUF_SIZE];
|
static char stdout_buff[_STDOUT_BUF_SIZE];
|
||||||
|
@ -75,9 +76,10 @@ void posix_print_error_and_exit(const char *format, ...)
|
||||||
va_list variable_argsp;
|
va_list variable_argsp;
|
||||||
|
|
||||||
va_start(variable_argsp, format);
|
va_start(variable_argsp, format);
|
||||||
bs_trace_vprint(BS_TRACE_ERROR, NULL, 0, 0, BS_TRACE_AUTOTIME, 0,
|
bs_trace_vprint(BS_TRACE_WARNING, NULL, 0, 0, BS_TRACE_AUTOTIME, 0,
|
||||||
format, variable_argsp);
|
format, variable_argsp);
|
||||||
va_end(variable_argsp);
|
va_end(variable_argsp);
|
||||||
|
posix_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void posix_print_warning(const char *format, ...)
|
void posix_print_warning(const char *format, ...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue