aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monitor.c4
-rw-r--r--vl.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 9a18639c4b..5edd39e922 100644
--- a/monitor.c
+++ b/monitor.c
@@ -82,8 +82,10 @@ void term_puts(const char *str)
c = *str++;
if (c == '\0')
break;
+ if (c == '\n')
+ term_outbuf[term_outbuf_index++] = '\r';
term_outbuf[term_outbuf_index++] = c;
- if (term_outbuf_index >= sizeof(term_outbuf) ||
+ if (term_outbuf_index >= (sizeof(term_outbuf) - 1) ||
c == '\n')
term_flush();
}
diff --git a/vl.c b/vl.c
index 77ebd3557f..6787332ba7 100644
--- a/vl.c
+++ b/vl.c
@@ -6159,7 +6159,7 @@ int main(int argc, char **argv)
exit(1);
}
if (!strcmp(serial_devices[i], "vc"))
- qemu_chr_printf(serial_hds[i], "serial%d console\n", i);
+ qemu_chr_printf(serial_hds[i], "serial%d console\r\n", i);
}
}
@@ -6172,7 +6172,7 @@ int main(int argc, char **argv)
exit(1);
}
if (!strcmp(parallel_devices[i], "vc"))
- qemu_chr_printf(parallel_hds[i], "parallel%d console\n", i);
+ qemu_chr_printf(parallel_hds[i], "parallel%d console\r\n", i);
}
}