From 219c27d420fe0abe5515cefc2513c6fe60aafdf9 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 7 Jul 2024 21:47:14 +0300 Subject: 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. --- src/debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/debug.c') 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; -- cgit v1.3