From ad70b3b8ca1effe52c216e39a37aac1e8b976d88 Mon Sep 17 00:00:00 2001 From: miod Date: Thu, 8 May 2014 19:06:07 +0000 Subject: [PATCH] Format string fixes. --- sys/arch/vax/mscp/mscp_disk.c | 4 ++-- sys/arch/vax/vax/ka43.c | 6 +++--- sys/arch/vax/vax/ka650.c | 12 ++++++------ sys/arch/vax/vax/ka670.c | 7 ++++--- sys/arch/vax/vax/pmap.c | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index 00159656d80..88c5dd4f69f 100644 --- a/sys/arch/vax/mscp/mscp_disk.c +++ b/sys/arch/vax/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_disk.c,v 1.40 2013/11/01 20:27:21 krw Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.41 2014/05/08 19:06:07 miod Exp $ */ /* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -205,7 +205,7 @@ ra_putonline(struct ra_softc *ra) if (rc != EIO) ra->ra_state = DK_OPEN; - printf("%s: %luMB, %lu bytes/sector, %lu sectors\n", + printf("%s: %luMB, %u bytes/sector, %lu sectors\n", ra->ra_dev.dv_xname, ra->ra_unitsize / (1048576 / dl->d_secsize), dl->d_secsize, ra->ra_unitsize); diff --git a/sys/arch/vax/vax/ka43.c b/sys/arch/vax/vax/ka43.c index 01f47cf3812..05c7ad6b343 100644 --- a/sys/arch/vax/vax/ka43.c +++ b/sys/arch/vax/vax/ka43.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ka43.c,v 1.15 2011/09/15 00:48:24 miod Exp $ */ +/* $OpenBSD: ka43.c,v 1.16 2014/05/08 19:06:07 miod Exp $ */ /* $NetBSD: ka43.c,v 1.19 1999/09/06 19:52:53 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -175,7 +175,7 @@ ka43_memerr() * and try to go on... */ printf("memory error!\n"); - printf("primary cache status: %b\n", mfpr(PR_PCSTS), KA43_PCSTS_BITS); + printf("primary cache status: %lb\n", mfpr(PR_PCSTS), KA43_PCSTS_BITS); printf("secondary cache status: %b\n", *ka43_creg, KA43_SESR_BITS); } @@ -209,7 +209,7 @@ ka43_cache_reset(int silent) ka43_cache_enable(); if (silent == 0) { - printf("primary cache status: %b\n", mfpr(PR_PCSTS), + printf("primary cache status: %lb\n", mfpr(PR_PCSTS), KA43_PCSTS_BITS); printf("secondary cache status: %b\n", *ka43_creg, KA43_SESR_BITS); diff --git a/sys/arch/vax/vax/ka650.c b/sys/arch/vax/vax/ka650.c index 0bd515a0687..d9e4491ec35 100644 --- a/sys/arch/vax/vax/ka650.c +++ b/sys/arch/vax/vax/ka650.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ka650.c,v 1.21 2011/09/19 21:53:02 miod Exp $ */ +/* $OpenBSD: ka650.c,v 1.22 2014/05/08 19:06:07 miod Exp $ */ /* $NetBSD: ka650.c,v 1.25 2001/04/27 15:02:37 ragge Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -106,8 +106,8 @@ uvaxIII_conf() (vax_cpudata & 0xff), GETFRMREV(vax_siedata)); ka650setcache(CACHEON); if (ptoa(physmem) > ka650merr_ptr->merr_qbmbr) { - printf("physmem(0x%x) > qbmbr(0x%x)\n", - ptoa(physmem), (int)ka650merr_ptr->merr_qbmbr); + printf("physmem(0x%lx) > qbmbr(0x%lx)\n", + ptoa(physmem), ka650merr_ptr->merr_qbmbr); panic("qbus map unprotected"); } if (mfpr(PR_TODR) == 0) @@ -172,10 +172,10 @@ uvaxIII_mchk(cmcf) printf("\n\tvap %x istate1 %x istate2 %x pc %x psl %x\n", mcf->cvax_mrvaddr, mcf->cvax_istate1, mcf->cvax_istate2, mcf->cvax_pc, mcf->cvax_psl); - printf("dmaser=0x%b qbear=0x%x dmaear=0x%x\n", + printf("dmaser=0x%lb qbear=0x%lx dmaear=0x%lx\n", ka650merr_ptr->merr_dser, DMASER_BITS, - (int)ka650merr_ptr->merr_qbear, - (int)ka650merr_ptr->merr_dear); + ka650merr_ptr->merr_qbear, + ka650merr_ptr->merr_dear); ka650merr_ptr->merr_dser = DSER_CLEAR; i = mfpr(PR_CAER); diff --git a/sys/arch/vax/vax/ka670.c b/sys/arch/vax/vax/ka670.c index e3ca9800663..0f3ee6ef380 100644 --- a/sys/arch/vax/vax/ka670.c +++ b/sys/arch/vax/vax/ka670.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ka670.c,v 1.11 2011/09/15 00:48:24 miod Exp $ */ +/* $OpenBSD: ka670.c,v 1.12 2014/05/08 19:06:07 miod Exp $ */ /* $NetBSD: ka670.c,v 1.4 2000/03/13 23:52:35 soren Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. @@ -165,8 +165,9 @@ ka670_memerr() * and try to go on... */ printf("memory error!\n"); - printf("primary cache status: %b\n", mfpr(PR_PCSTS), KA670_PCSTS_BITS); - printf("secondary cache status: %b\n", mfpr(PR_BCSTS), KA670_BCSTS_BITS); + printf("primary cache status: %lb\n", mfpr(PR_PCSTS), KA670_PCSTS_BITS); + printf("secondary cache status: %lb\n", mfpr(PR_BCSTS), + KA670_BCSTS_BITS); } int diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index b9c7707c744..c97421f99ec 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.63 2014/02/09 20:58:49 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.64 2014/05/08 19:06:07 miod Exp $ */ /* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */ /* * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden. @@ -1297,7 +1297,7 @@ pmap_protect(struct pmap *pmap, vaddr_t start, vaddr_t end, vm_prot_t prot) pr = (prot & VM_PROT_WRITE ? PG_RW : PG_RO); break; default: - panic("unsupported segtype: %d", SEGTYPE(start)); + panic("unsupported segtype: %d", (int)SEGTYPE(start)); } pts = &pt[start >> VAX_PGSHIFT]; -- 2.20.1