diff --git a/hypervisor/debug/shell_internal.h b/hypervisor/debug/shell_internal.h index 5184bfe41..ccbd69f83 100644 --- a/hypervisor/debug/shell_internal.h +++ b/hypervisor/debug/shell_internal.h @@ -170,7 +170,7 @@ uint8_t shell_getc_serial(struct shell *p_shell); void shell_special_serial(struct shell *p_shell, uint8_t ch); void kick_shell(struct shell *p_shell); -int shell_puts(struct shell *p_shell, const char *str_ptr); +void shell_puts(struct shell *p_shell, const char *str_ptr); int shell_set_name(struct shell *p_shell, const char *name); int shell_trigger_crash(struct shell *p_shell, int argc, char **argv); diff --git a/hypervisor/debug/shell_public.c b/hypervisor/debug/shell_public.c index 4aedf1857..c07d1076a 100644 --- a/hypervisor/debug/shell_public.c +++ b/hypervisor/debug/shell_public.c @@ -159,23 +159,16 @@ int shell_init(void) return status; } -int shell_puts(struct shell *p_shell, const char *str_ptr) +/** + * @pre p_shell != NULL + * @pre p_shell->session_io.io_puts != NULL + * @pre str_ptr != NULL + */ +void shell_puts(struct shell *p_shell, const char *str_ptr) { - int status; + /* Transmit data using this shell session's 'puts' function */ + p_shell->session_io.io_puts(p_shell, str_ptr); - if ((p_shell != NULL) && (p_shell->session_io.io_puts != NULL) && - (str_ptr != NULL)) { - /* Transmit data using this shell session's 'puts' function */ - p_shell->session_io.io_puts(p_shell, str_ptr); - - status = 0; - } else { - /* Error: Invalid request */ - status = -EINVAL; - - } - - return status; } int shell_set_name(struct shell *p_shell, const char *name)