A few more straightforward format string fixes.
authorkettenis <kettenis@openbsd.org>
Sat, 10 May 2014 12:29:58 +0000 (12:29 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 10 May 2014 12:29:58 +0000 (12:29 +0000)
sys/arch/sparc64/sparc64/autoconf.c
sys/arch/sparc64/sparc64/intr.c
sys/arch/sparc64/sparc64/ipifuncs.c
sys/arch/sparc64/sparc64/machdep.c
sys/arch/sparc64/sparc64/trap.c

index c8ba863..59c6989 100644 (file)
@@ -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");
index 92c78d3..0a61f1d 100644 (file)
@@ -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) {
index 9d33934..e6dd8a5 100644 (file)
@@ -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
index a18a9c0..be4eb8d 100644 (file)
@@ -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());
index 1be8548..990dac1 100644 (file)
@@ -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 */
                }