Fixed ^D behavior.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15385 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
ce119aef13
commit
a500cf055a
|
@ -65,9 +65,7 @@ bool shell_getline(char *line, size_t size) {
|
|||
if (read(STDIN_FILENO, &c, 1) == 0)
|
||||
return true;
|
||||
|
||||
if (c == 4) {
|
||||
shell_putc('^');
|
||||
shell_putc('D');
|
||||
if ((c == 4) && (p == line)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -311,8 +309,7 @@ int main(int argc, char *argv[], char *envp[]) {
|
|||
|
||||
/* Reading input line.*/
|
||||
if (shell_getline(line, SHELL_MAX_LINE_LENGTH)) {
|
||||
shell_write(SHELL_NEWLINE_STR);
|
||||
shell_write("logout" SHELL_NEWLINE_STR);
|
||||
shell_write("exit" SHELL_NEWLINE_STR);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue