From 67b09432145a43571ff29de2a8b0d6766ec8e1c9 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 25 Jul 2025 21:39:42 -0400 Subject: kernel: cons: Create seperate 'scr' var for root Signed-off-by: Ian Moffett --- sys/dev/cons/cons.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/cons/cons.c b/sys/dev/cons/cons.c index 88cbcbe..d9d727a 100644 --- a/sys/dev/cons/cons.c +++ b/sys/dev/cons/cons.c @@ -356,6 +356,7 @@ dev_write(dev_t dev, struct sio_txn *sio, int flags) static int dev_read(dev_t dev, struct sio_txn *sio, int flags) { + struct cons_screen *scr = &g_root_scr; struct cons_input input; uint8_t *p; int retval; @@ -369,7 +370,7 @@ dev_read(dev_t dev, struct sio_txn *sio, int flags) return -EFAULT; } - retval = cons_ibuf_pop(&g_root_scr, &input); + retval = cons_ibuf_pop(scr, &input); if (retval < 0) { return -EAGAIN; } @@ -386,7 +387,7 @@ dev_read(dev_t dev, struct sio_txn *sio, int flags) n -= 2; /* Try to get the next byte */ - retval = cons_ibuf_pop(&g_root_scr, &input); + retval = cons_ibuf_pop(scr, &input); if (retval < 0) { break; } -- cgit v1.2.3