[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/52] ui/vc: replace vc_chr_write() with generic qemu_chr_write()
From: |
marcandre . lureau |
Subject: |
[PULL 04/52] ui/vc: replace vc_chr_write() with generic qemu_chr_write() |
Date: |
Mon, 4 Sep 2023 15:52:01 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
We shouldn't call the callback directly, but use the chardev API, unless
there is a clear reason.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230830093843.3531473-5-marcandre.lureau@redhat.com>
---
ui/console.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index 9c17024dbc..a448e4d283 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1169,13 +1169,13 @@ void kbd_put_keysym_console(QemuConsole *s, int keysym)
*q++ = '[';
*q++ = keysym & 0xff;
} else if (s->echo && (keysym == '\r' || keysym == '\n')) {
- vc_chr_write(s->chr, (const uint8_t *) "\r", 1);
+ qemu_chr_write(s->chr, (uint8_t *)"\r", 1, true);
*q++ = '\n';
} else {
*q++ = keysym;
}
if (s->echo) {
- vc_chr_write(s->chr, buf, q - buf);
+ qemu_chr_write(s->chr, buf, q - buf, true);
}
num_free = fifo8_num_free(&s->out_fifo);
fifo8_push_all(&s->out_fifo, buf, MIN(num_free, q - buf));
@@ -2474,7 +2474,7 @@ static void text_console_do_init(Chardev *chr,
DisplayState *ds)
s->t_attrib.bgcol = QEMU_COLOR_BLUE;
msg = g_strdup_printf("%s console\r\n", chr->label);
- vc_chr_write(chr, (uint8_t *)msg, strlen(msg));
+ qemu_chr_write(chr, (uint8_t *)msg, strlen(msg), true);
g_free(msg);
s->t_attrib = s->t_attrib_default;
}
--
2.41.0
- [PULL 00/52] UI patches, marcandre . lureau, 2023/09/04
- [PULL 01/52] ui: remove qemu_pixman_color() helper, marcandre . lureau, 2023/09/04
- [PULL 02/52] ui: remove qemu_pixman_linebuf_copy(), marcandre . lureau, 2023/09/04
- [PULL 03/52] ui/qmp: move screendump to ui-qmp-cmds.c, marcandre . lureau, 2023/09/04
- [PULL 04/52] ui/vc: replace vc_chr_write() with generic qemu_chr_write(),
marcandre . lureau <=
- [PULL 05/52] ui/vc: drop have_text, marcandre . lureau, 2023/09/04
- [PULL 06/52] ui/console: console_select() regardless of have_gfx, marcandre . lureau, 2023/09/04
- [PULL 07/52] ui/console: call dpy_gfx_update() regardless of have_gfx, marcandre . lureau, 2023/09/04
- [PULL 08/52] ui/console: drop have_gfx, marcandre . lureau, 2023/09/04
- [PULL 09/52] ui/console: get the DisplayState from new_console(), marcandre . lureau, 2023/09/04
- [PULL 10/52] ui/console: new_console() cannot fail, marcandre . lureau, 2023/09/04
- [PULL 11/52] ui/vc: VC always has a DisplayState now, marcandre . lureau, 2023/09/04
- [PULL 12/52] ui/vc: move VCChardev declaration at the top, marcandre . lureau, 2023/09/04
- [PULL 14/52] ui/vc: fold text_update_xy(), marcandre . lureau, 2023/09/04
- [PULL 13/52] ui/vc: replace variable with static text attributes default, marcandre . lureau, 2023/09/04