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
2024-10-24 21:24:44 -05:00
committed by Kinsey Moore
parent e0f1c8fe0b
commit d0e9ec85b0

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;