|
| 1 | +From 277489f19bd0e58396606973bb79b6faa8e1e0a5 Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Thu, 30 Oct 2014 20:45:19 +0000 |
| 4 | +Subject: [PATCH] fix printk to use FMT-cell instead of %x where it should |
| 5 | + |
| 6 | +--- |
| 7 | + arch/unix/unix.c | 8 ++++---- |
| 8 | + 1 file changed, 4 insertions(+), 4 deletions(-) |
| 9 | + |
| 10 | +diff --git a/arch/unix/unix.c b/arch/unix/unix.c |
| 11 | +index 1f628eb..db70e0a 100644 |
| 12 | +--- a/arch/unix/unix.c |
| 13 | ++++ b/arch/unix/unix.c |
| 14 | +@@ -324,10 +324,10 @@ segv_handler(int signo __attribute__ ((unused)), |
| 15 | + if (PC >= (ucell) dict && PC <= (ucell) dict + dicthead) |
| 16 | + addr = *(ucell *) PC; |
| 17 | + |
| 18 | +- printk("panic: segmentation violation at %x\n", (ucell)si->si_addr); |
| 19 | +- printk("dict=0x%x here=0x%x(dict+0x%x) pc=0x%x(dict+0x%x)\n", |
| 20 | ++ printk("panic: segmentation violation at " FMT_cell "\n", (ucell)si->si_addr); |
| 21 | ++ printk("dict=0x" FMT_cell " here=0x" FMT_cell " (dict+0x" FMT_cell ") pc=0x" FMT_cell "(dict+0x" FMT_cell ")\n", |
| 22 | + (ucell)dict, (ucell)dict + dicthead, dicthead, PC, PC - (ucell) dict); |
| 23 | +- printk("dstackcnt=%d rstackcnt=%d instruction=%x\n", |
| 24 | ++ printk("dstackcnt=%d rstackcnt=%d instruction=" FMT_cell "\n", |
| 25 | + dstackcnt, rstackcnt, addr); |
| 26 | + |
| 27 | + #ifdef CONFIG_DEBUG_DSTACK |
| 28 | +@@ -566,7 +566,7 @@ int main(int argc, char *argv[]) |
| 29 | + if (optind + 1 != argc) |
| 30 | + printk("Warning: only first dictionary used.\n"); |
| 31 | + |
| 32 | +- printk("dictionary loaded (%d bytes).\n", dicthead); |
| 33 | ++ printk("dictionary loaded (" FMT_cell "bytes).\n", dicthead); |
| 34 | + printk("Initializing memory..."); |
| 35 | + } |
| 36 | + init_memory(); |
| 37 | +-- |
| 38 | +2.1.2 |
| 39 | + |
0 commit comments