From a39658738ca07b4fa277a5e2de2c54ac731ee612 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 18 May 2024 22:46:23 -0400 Subject: kernel: vcons: Move vcons_process_output() call Only process output in vcons_putstr() Signed-off-by: Ian Moffett --- sys/dev/vcons/vcons.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/vcons/vcons.c b/sys/dev/vcons/vcons.c index 15e97e4..fe1a3f0 100644 --- a/sys/dev/vcons/vcons.c +++ b/sys/dev/vcons/vcons.c @@ -158,11 +158,6 @@ vcons_putch(struct vcons_screen *scr, char c) return 1; } - if (vcons_process_output(scr, c) >= 0) { - /* No need to do anything */ - return 0; - } - /* Check cursor bounds */ if (cursor->xpos >= PIX_BOUNDS_MAX_X(scr)) { cursor->xpos = FONT_WIDTH; @@ -208,6 +203,8 @@ vcons_putstr(struct vcons_screen *scr, const char *s, size_t len) int status; for (size_t i = 0; i < len; ++i) { + if (vcons_process_output(scr, s[i]) > 0) + continue; if ((status = vcons_putch(scr, s[i])) != 0) { return status; } -- cgit v1.2.3