From 458d46e220e9428be7ec6c38b015f62d80e4cda9 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 9 Jul 2025 22:12:38 -0400 Subject: kernel: cons: Remove problematic lock Signed-off-by: Ian Moffett --- sys/dev/cons/cons.c | 2 -- usr.bin/fetch/fetch.c | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/cons/cons.c b/sys/dev/cons/cons.c index 7407ec1..88cbcbe 100644 --- a/sys/dev/cons/cons.c +++ b/sys/dev/cons/cons.c @@ -375,7 +375,6 @@ dev_read(dev_t dev, struct sio_txn *sio, int flags) } cons_attach(); - spinlock_acquire(&g_root_scr.lock); for (;;) { /* Buffer too small */ if (n == 0) { @@ -392,7 +391,6 @@ dev_read(dev_t dev, struct sio_txn *sio, int flags) break; } } - spinlock_release(&g_root_scr.lock); return sio->len; } diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 42c2825..175cd0e 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -32,18 +32,19 @@ #include #include +static const char *user = "unknown"; + #define ASCII_ART \ " ____ \n" \ " | \\__\\ \n" \ - " | /\\ \\ user: root\n" \ + " | /\\ \\ user: %s\n" \ " |/ \\ \\ OS: Hyra/amd64 v"_OSVER"\n" \ " \\ R. \\ \\ arch: "_OSARCH"\n" \ - " \\ I. \\ \\" - + " \\ I. \\ \\\n" int main(void) { - puts(ASCII_ART); + printf(ASCII_ART, getlogin()); return 0; } -- cgit v1.2.3