summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-25 21:39:42 -0400
committerIan Moffett <ian@osmora.org>2025-07-25 21:39:42 -0400
commit67b09432145a43571ff29de2a8b0d6766ec8e1c9 (patch)
treeb9095693540d54570c0a561143eb3c80a8f3bd82 /sys
parenta38add7b89d563d07e889759e80dbf9d66df37d8 (diff)
kernel: cons: Create seperate 'scr' var for root
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cons/cons.c5
1 files 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;
}