From 839e370a0ca95dc4619822889b5819920b329036 Mon Sep 17 00:00:00 2001 From: Oleg Lyovin Date: Fri, 11 Aug 2017 18:34:00 +0300 Subject: [PATCH] apps/shell: hide usleep call if signals are disabled * usleep() is not available if signals are disabled. Signed-off-by: Oleg Lyovin --- apps/shell/tash_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/shell/tash_main.c b/apps/shell/tash_main.c index b81b672..adca886 100644 --- a/apps/shell/tash_main.c +++ b/apps/shell/tash_main.c @@ -162,8 +162,9 @@ static int tash_open_console(void) if (ret > 0) { break; } - +#ifndef CONFIG_DISABLE_SIGNALS usleep(20); +#endif if (cnt == TASH_TRY_MAXCNT) { shdbg("TASH: can not open uart, tried (%d) times\n", cnt); ret = ERROR; @@ -199,7 +200,9 @@ static int tash_main(int argc, char *argv[]) nbytes = write(fd, tash_prompt, sizeof(tash_prompt)); if (nbytes <= 0) { shdbg("TASH: prompt is not displayed (errno = %d)\n", get_errno()); +#ifndef CONFIG_DISABLE_SIGNALS usleep(20); +#endif continue; } line_buff = tash_read_input_line(fd); -- 2.7.4