mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
parent
0c2bdf9edd
commit
3fd561aab6
@ -32,7 +32,7 @@ int main(int, char **)
|
|||||||
terminal.read_avail_sigh(sig_rec.manage(&sig_ctx));
|
terminal.read_avail_sigh(sig_rec.manage(&sig_ctx));
|
||||||
|
|
||||||
static const char *intro_text =
|
static const char *intro_text =
|
||||||
"--- Terminal echo test started - now you can type characters to be echoed. ---\n";
|
"--- Terminal echo test started - now you can type characters to be echoed. ---\r\n";
|
||||||
terminal.write(intro_text, strlen(intro_text) + 1);
|
terminal.write(intro_text, strlen(intro_text) + 1);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -44,8 +44,13 @@ int main(int, char **)
|
|||||||
if (verbose && (num_bytes > 0))
|
if (verbose && (num_bytes > 0))
|
||||||
PDBG("got %d bytes", num_bytes);
|
PDBG("got %d bytes", num_bytes);
|
||||||
|
|
||||||
for (int i = 0; i < num_bytes; i++)
|
for (int i = 0; i < num_bytes; i++) {
|
||||||
|
if (read_buffer[i] == '\r') {
|
||||||
|
terminal.write("\n", 1);
|
||||||
|
}
|
||||||
|
|
||||||
terminal.write(&read_buffer[i], 1);
|
terminal.write(&read_buffer[i], 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user