diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-03-23 02:59:44 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-03-24 16:37:24 -0700 |
commit | f6659f1c764ad5d3d64743567914608ec3ed8b06 (patch) | |
tree | 3b54d16b3dfbfb535cce587e76ed2cf1a9bf1710 /pk/mtrap.c | |
parent | a79f62f72a897f9eafea1b41d98e1367dd413d02 (diff) | |
download | pk-f6659f1c764ad5d3d64743567914608ec3ed8b06.zip pk-f6659f1c764ad5d3d64743567914608ec3ed8b06.tar.gz pk-f6659f1c764ad5d3d64743567914608ec3ed8b06.tar.bz2 |
Make printk safer and use less stack
Diffstat (limited to 'pk/mtrap.c')
-rw-r--r-- | pk/mtrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -126,7 +126,7 @@ static uintptr_t mcall_console_putchar(uint8_t ch) } #define printm(str, ...) ({ \ - char buf[1024], *p = buf; sprintk(buf, str, __VA_ARGS__); \ + char buf[128], *p = buf; snprintf(buf, sizeof(buf), str, __VA_ARGS__); \ while (*p) mcall_console_putchar(*p++); }) static uintptr_t mcall_dev_req(sbi_device_message *m) |