From d0e9ec85b067dbda19fc50e66830c3e1d92fb232 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Thu, 24 Oct 2024 21:24:44 -0500 Subject: [PATCH] cpukit/libmisc/shell: Remove shell prompt carriage return This removes the carriage return printed before the shell prompt as it can cause other output to be overwritten unexpectedly. This was discovered when using the "cat" shell command on a file whose content contained no trailing \n\r and was short enough to be entirely swallowed by the prompt. --- cpukit/libmisc/shell/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c index cb939dc1c5..71bf82840a 100644 --- a/cpukit/libmisc/shell/shell.c +++ b/cpukit/libmisc/shell/shell.c @@ -329,7 +329,7 @@ static int rtems_shell_line_editor( } if (out != NULL && prompt != NULL) - fprintf(out, "\r%s", prompt); + fprintf(out, "%s", prompt); line[0] = 0; new_line[0] = 0;