summaryrefslogtreecommitdiff
path: root/src/kernel/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/log.c')
-rw-r--r--src/kernel/log.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/kernel/log.c b/src/kernel/log.c
index 6bad1cc..2819a2e 100644
--- a/src/kernel/log.c
+++ b/src/kernel/log.c
@@ -52,8 +52,16 @@ void logf(enum log_level level, const char *format, ...) {
while (*s)
logch(*(s++));
break;
+ case 'n':;
+ uint32_t d = va_arg(args, uint32_t);
+ if (d >= 0x80000000) {
+ logch('-');
+ d = -d;
+ }
+ goto put_dec;
case 'd':;
- const uint32_t d = va_arg(args, uint32_t);
+ d = va_arg(args, uint32_t);
+ put_dec:
if (d == 0) {
logch('0');
break;