From 1b84c71f23e45ed2e00a4ef3fb643acc0725491b Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 10 May 2014 12:29:58 +0000 Subject: [PATCH] A few more straightforward format string fixes. --- sys/arch/sparc64/sparc64/autoconf.c | 6 +++--- sys/arch/sparc64/sparc64/intr.c | 9 ++++----- sys/arch/sparc64/sparc64/ipifuncs.c | 8 +++++--- sys/arch/sparc64/sparc64/machdep.c | 4 ++-- sys/arch/sparc64/sparc64/trap.c | 11 ++++++----- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index c8ba8639260..59c6989bf21 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.118 2014/03/29 18:09:30 guenther Exp $ */ +/* $OpenBSD: autoconf.c,v 1.119 2014/05/10 12:29:58 kettenis Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -594,11 +594,11 @@ bootpath_print(bp) printf("bootpath: "); while (bp->name[0]) { if (bp->val[0] == -1) - printf("/%s%x", bp->name, bp->val[1]); + printf("/%s%lx", bp->name, bp->val[1]); else printf("/%s@%lx,%lx", bp->name, bp->val[0], bp->val[1]); if (bp->val[2] != 0) - printf(":%c", bp->val[2] + 'a'); + printf(":%c", (int)bp->val[2] + 'a'); bp++; } printf("\n"); diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c index 92c78d31ffb..0a61f1dc8e3 100644 --- a/sys/arch/sparc64/sparc64/intr.c +++ b/sys/arch/sparc64/sparc64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.47 2014/03/29 18:09:30 guenther Exp $ */ +/* $OpenBSD: intr.c,v 1.48 2014/05/10 12:29:58 kettenis Exp $ */ /* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */ /* @@ -98,10 +98,9 @@ strayintr(fp, vectored) /* If we're in polled mode ignore spurious interrupts */ if ((fp->tf_pil == PIL_SER) /* && swallow_zsintrs */) return; - printf("stray interrupt ipl %u pc=%llx npc=%llx pstate=%b " - "vectored=%d\n", fp->tf_pil, (unsigned long long)fp->tf_pc, - (unsigned long long)fp->tf_npc, fp->tf_tstate>>TSTATE_PSTATE_SHIFT, - PSTATE_BITS, vectored); + printf("stray interrupt ipl %u pc=%llx npc=%llx pstate=%llb " + "vectored=%d\n", fp->tf_pil, fp->tf_pc, fp->tf_npc, + fp->tf_tstate >> TSTATE_PSTATE_SHIFT, PSTATE_BITS, vectored); timesince = time_second - straytime; if (timesince <= 10) { diff --git a/sys/arch/sparc64/sparc64/ipifuncs.c b/sys/arch/sparc64/sparc64/ipifuncs.c index 9d3393414b2..e6dd8a5152f 100644 --- a/sys/arch/sparc64/sparc64/ipifuncs.c +++ b/sys/arch/sparc64/sparc64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipifuncs.c,v 1.14 2014/03/29 18:09:30 guenther Exp $ */ +/* $OpenBSD: ipifuncs.c,v 1.15 2014/05/10 12:29:58 kettenis Exp $ */ /* $NetBSD: ipifuncs.c,v 1.8 2006/10/07 18:11:36 rjs Exp $ */ /*- @@ -142,7 +142,8 @@ sun4v_send_ipi(int itid, void (*func)(void), u_int64_t arg0, u_int64_t arg1) delay(10); } if (err != H_EOK) - panic("Unable to send mondo %lx to cpu %d: %d", func, itid, err); + panic("Unable to send mondo %llx to cpu %d: %d", + (u_int64_t)func, itid, err); } /* @@ -203,7 +204,8 @@ sun4v_broadcast_ipi(void (*func)(void), u_int64_t arg0, u_int64_t arg1) delay(10); } if (err != H_EOK) - panic("Unable to broadcast mondo %lx: %d", func, err); + panic("Unable to broadcast mondo %llx: %d", + (u_int64_t)func, err); } void diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index a18a9c03a64..be4eb8d5e23 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.153 2014/03/26 05:23:42 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.154 2014/05/10 12:29:58 kettenis Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -825,7 +825,7 @@ printf("starting dump, blkno %lld\n", (long long)blkno); /* print out how many MBs we have dumped */ if (i && (i % (1024*1024)) == 0) - printf("%d ", i / (1024*1024)); + printf("%lld ", i / (1024*1024)); (void) pmap_enter(pmap_kernel(), dumpspace, maddr, VM_PROT_READ, VM_PROT_READ|PMAP_WIRED); pmap_update(pmap_kernel()); diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index 1be854801b4..990dac1ea63 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.82 2014/05/10 05:33:00 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.83 2014/05/10 12:29:58 kettenis Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -954,7 +954,7 @@ data_access_error(tf, type, afva, afsr, sfva, sfsr) trap_trace_dis = 1; /* Disable traptrace for printf */ (void) splhigh(); - panic("data fault: pc=%lx addr=%lx sfsr=%b", + panic("data fault: pc=%lx addr=%lx sfsr=%lb", (u_long)pc, (long)sfva, sfsr, SFSR_BITS); /* NOTREACHED */ } @@ -964,7 +964,7 @@ data_access_error(tf, type, afva, afsr, sfva, sfsr) * cannot recover, so panic. */ if (afsr & ASFR_PRIV) { - panic("Privileged Async Fault: AFAR %p AFSR %lx\n%b", + panic("Privileged Async Fault: AFAR %p AFSR %lx\n%lb", (void *)afva, afsr, afsr, AFSR_BITS); /* NOTREACHED */ } @@ -1128,7 +1128,8 @@ text_access_error(tf, type, pc, sfsr, afva, afsr) extern int trap_trace_dis; trap_trace_dis = 1; /* Disable traptrace for printf */ (void) splhigh(); - panic("kernel text error: pc=%lx sfsr=%b", pc, sfsr, SFSR_BITS); + panic("kernel text error: pc=%lx sfsr=%lb", pc, + sfsr, SFSR_BITS); /* NOTREACHED */ } else p->p_md.md_tf = tf; @@ -1162,7 +1163,7 @@ text_access_error(tf, type, pc, sfsr, afva, afsr) extern int trap_trace_dis; trap_trace_dis = 1; /* Disable traptrace for printf */ (void) splhigh(); - panic("kernel text error: pc=%lx sfsr=%b", pc, + panic("kernel text error: pc=%lx sfsr=%lb", pc, sfsr, SFSR_BITS); /* NOTREACHED */ } -- 2.20.1