mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ui/console-vc: report to the application instead of screen rendering
Terminal Device Status Report (DSR) [1] should be sent to an application, not rendered to the screen. This patch fixes rendering of terminal report, which appear only on the graphical screen of the terminal (console "vc") and can be reproduced by the following command: echo -en '\e[6n'; IFS='[;' read -sdR _ row col; echo $row:$col Command requests cursor position and waits for terminal response, but instead, the response is rendered to the graphical screen and never sent to an application. Why bother? Busybox shell (ash) in Alpine distribution requests cursor position on each shell prompt (once <ENTER> is pressed), which makes a prompt on a graphical screen corrupted with repeating Cursor Position Report (CPR) [2]: [root@alpine ~]# \033[57;1R] Which is very annoying and incorrect. [1] https://vt100.net/docs/vt100-ug/chapter3.html#DSR [2] https://vt100.net/docs/vt100-ug/chapter3.html#CPR Signed-off-by: Roman Penyaev <r.peniaev@gmail.com> Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> Cc: qemu-devel@nongnu.org Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20250226075913.353676-3-r.peniaev@gmail.com>
This commit is contained in:
parent
e4d6c94e67
commit
0a9f48e9ea
1 changed files with 3 additions and 4 deletions
|
@ -617,10 +617,9 @@ static void vc_put_one(VCChardev *vc, int ch)
|
|||
|
||||
static void vc_respond_str(VCChardev *vc, const char *buf)
|
||||
{
|
||||
while (*buf) {
|
||||
vc_put_one(vc, *buf);
|
||||
buf++;
|
||||
}
|
||||
QemuTextConsole *s = vc->console;
|
||||
|
||||
qemu_chr_be_write(s->chr, (const uint8_t *)buf, strlen(buf));
|
||||
}
|
||||
|
||||
/* set cursor, checking bounds */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue