aboutsummaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 21:47:14 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 21:47:14 +0300
commit219c27d420fe0abe5515cefc2513c6fe60aafdf9 (patch)
tree5cd0c38a971245c91fd7bc3539b4a37c8a08a7f1 /src/debug.c
parentfe4c623cb9320226866829317cea8ba0c49e7dbc (diff)
downloadkmi-219c27d420fe0abe5515cefc2513c6fe60aafdf9.tar.gz
kmi-219c27d420fe0abe5515cefc2513c6fe60aafdf9.zip
add req_page back in as I realized it's useful
+ Can be used to pass contiguous memory regions to things like virtio block devices for implementing disk drivers etc.
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c
index 9573bbc..567911b 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -753,7 +753,10 @@ void dbg(const char *fmt, ...)
if (is_set(flags, PRECS_FLAG))
i = precision;
- chars_written += __puts(s);
+ for (; *s && i--;) {
+ __putchar(*s++);
+ chars_written++;
+ }
fmt++;
break;