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.
This commit is contained in:
Kinsey Moore authored and Kinsey Moore committed 2024-10-25 02:44:37 +00:00
1 parent e0f1c8fe0b
commit d0e9ec85b0
1 file changed
+1 -1
+1 -1
View File
@@ -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;