From 228c4dc2c14a82a8a676dd3dc815c90ae399d5a2 Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 18 Aug 1998 00:32:50 +0000 Subject: [PATCH] Fixed printf format errors. --- sys/nfs/bootp_subr.c | 6 +++--- sys/nfs/krpc_subr.c | 6 +++--- sys/nfsclient/bootp_subr.c | 6 +++--- sys/nfsclient/krpc_subr.c | 6 +++--- sys/pccard/pcic_pci.c | 8 ++++---- sys/pci/meteor.c | 5 +++-- sys/pci/pcic_p.c | 8 ++++---- sys/pci/xrpu.c | 7 ++++--- sys/scsi/pt.c | 4 ++-- sys/scsi/scsi_driver.c | 8 ++++---- sys/scsi/scsi_ioctl.c | 4 ++-- sys/scsi/scsiconf.c | 8 ++++---- sys/scsi/sctarg.c | 4 ++-- sys/scsi/st.c | 16 ++++++++-------- sys/scsi/worm.c | 8 ++++---- 15 files changed, 53 insertions(+), 51 deletions(-) diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c index 2760b856e947..459af38343dc 100644 --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -1,4 +1,4 @@ -/* $Id: bootp_subr.c,v 1.12 1998/03/28 10:33:15 bde Exp $ */ +/* $Id: bootp_subr.c,v 1.13 1998/03/30 09:53:38 phk Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -361,8 +361,8 @@ bootpc_call(call,reply,procp) if (timo < MAX_RESEND_DELAY) timo++; else - printf("BOOTP timeout for server 0x%x\n", - ntohl(sin->sin_addr.s_addr)); + printf("BOOTP timeout for server 0x%lx\n", + (u_long)ntohl(sin->sin_addr.s_addr)); /* * Wait for up to timo seconds for a reply. diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c index f1dfa962abab..c77a5f52b1f5 100644 --- a/sys/nfs/krpc_subr.c +++ b/sys/nfs/krpc_subr.c @@ -1,5 +1,5 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ -/* $Id: krpc_subr.c,v 1.8 1998/03/14 03:25:16 tegge Exp $ */ +/* $Id: krpc_subr.c,v 1.9 1998/03/28 10:33:15 bde Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -337,8 +337,8 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) if (timo < MAX_RESEND_DELAY) timo++; else - printf("RPC timeout for server 0x%x\n", - ntohl(sa->sin_addr.s_addr)); + printf("RPC timeout for server 0x%lx\n", + (u_long)ntohl(sa->sin_addr.s_addr)); /* * Wait for up to timo seconds for a reply. diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 2760b856e947..459af38343dc 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -1,4 +1,4 @@ -/* $Id: bootp_subr.c,v 1.12 1998/03/28 10:33:15 bde Exp $ */ +/* $Id: bootp_subr.c,v 1.13 1998/03/30 09:53:38 phk Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -361,8 +361,8 @@ bootpc_call(call,reply,procp) if (timo < MAX_RESEND_DELAY) timo++; else - printf("BOOTP timeout for server 0x%x\n", - ntohl(sin->sin_addr.s_addr)); + printf("BOOTP timeout for server 0x%lx\n", + (u_long)ntohl(sin->sin_addr.s_addr)); /* * Wait for up to timo seconds for a reply. diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c index f1dfa962abab..c77a5f52b1f5 100644 --- a/sys/nfsclient/krpc_subr.c +++ b/sys/nfsclient/krpc_subr.c @@ -1,5 +1,5 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ -/* $Id: krpc_subr.c,v 1.8 1998/03/14 03:25:16 tegge Exp $ */ +/* $Id: krpc_subr.c,v 1.9 1998/03/28 10:33:15 bde Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -337,8 +337,8 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) if (timo < MAX_RESEND_DELAY) timo++; else - printf("RPC timeout for server 0x%x\n", - ntohl(sa->sin_addr.s_addr)); + printf("RPC timeout for server 0x%lx\n", + (u_long)ntohl(sa->sin_addr.s_addr)); /* * Wait for up to timo seconds for a reply. diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c index 61162bfae5d0..4c667f223d0d 100644 --- a/sys/pccard/pcic_pci.c +++ b/sys/pccard/pcic_pci.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: pcic_p.c,v 1.5 1998/02/07 20:41:20 nate Exp $ */ #include "pci.h" @@ -108,7 +108,7 @@ pcic_pci_attach(pcici_t config_id, int unit) for (j = 0; j < 0x98; j += 16) { printf("%02x: ", j); for (i = 0; i < 16; i += 4) - printf(" %08x", pci_conf_read(config_id, i+j)); + printf(" %08lx", pci_conf_read(config_id, i+j)); printf("\n"); } p = (u_char *)pmap_mapdev(pci_conf_read(config_id, 0x10), @@ -117,10 +117,10 @@ pcic_pci_attach(pcici_t config_id, int unit) printf("Cardbus Socket registers:\n"); printf("00: "); for (i = 0; i < 4; i += 1) - printf(" %08x:", pl[i]); + printf(" %08lx:", pl[i]); printf("\n10: "); for (i = 4; i < 8; i += 1) - printf(" %08x:", pl[i]); + printf(" %08lx:", pl[i]); printf("\nExCa registers:\n"); for (i = 0; i < 0x40; i += 16) printf("%02x: %16D\n", i, p + 0x800 + i, " "); diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c index 65824ca5d391..c65860beb084 100644 --- a/sys/pci/meteor.c +++ b/sys/pci/meteor.c @@ -963,7 +963,8 @@ meteor_init ( meteor_reg_t *mtr ) SAA7196_REG(mtr, SAA7196_STDC) & ~0x02); SAA7196_READ(mtr); printf("meteor%d: rev 0x%x\n", - METEOR_NUM(mtr), (mtr->base->i2c_read&0xff000000L)>>28); + METEOR_NUM(mtr), + (unsigned)((mtr->base->i2c_read & 0xff000000L) >> 28)); } else { i2c_print_err = 1; printf("meteor%d: \n", @@ -1042,7 +1043,7 @@ met_attach(pcici_t tag, int unit) pci_conf_write(tag, PCI_LATENCY_TIMER, latency<<8); } if(bootverbose) { - printf(" %d.\n", latency); + printf(" %lu.\n", latency); } meteor_init(mtr); /* set up saa7116, saa7196, and rgb module */ diff --git a/sys/pci/pcic_p.c b/sys/pci/pcic_p.c index 61162bfae5d0..4c667f223d0d 100644 --- a/sys/pci/pcic_p.c +++ b/sys/pci/pcic_p.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: pcic_p.c,v 1.5 1998/02/07 20:41:20 nate Exp $ */ #include "pci.h" @@ -108,7 +108,7 @@ pcic_pci_attach(pcici_t config_id, int unit) for (j = 0; j < 0x98; j += 16) { printf("%02x: ", j); for (i = 0; i < 16; i += 4) - printf(" %08x", pci_conf_read(config_id, i+j)); + printf(" %08lx", pci_conf_read(config_id, i+j)); printf("\n"); } p = (u_char *)pmap_mapdev(pci_conf_read(config_id, 0x10), @@ -117,10 +117,10 @@ pcic_pci_attach(pcici_t config_id, int unit) printf("Cardbus Socket registers:\n"); printf("00: "); for (i = 0; i < 4; i += 1) - printf(" %08x:", pl[i]); + printf(" %08lx:", pl[i]); printf("\n10: "); for (i = 4; i < 8; i += 1) - printf(" %08x:", pl[i]); + printf(" %08lx:", pl[i]); printf("\nExCa registers:\n"); for (i = 0; i < 0x40; i += 16) printf("%02x: %16D\n", i, p + 0x800 + i, " "); diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index 4a78d602f6d0..b46a3952dbcd 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: xrpu.c,v 1.1 1998/05/30 18:28:11 phk Exp $ * * A very simple device driver for PCI cards based on Xilinx 6200 series * FPGA/RPU devices. Current Functionality is to allow you to open and @@ -100,11 +100,12 @@ xrpu_attach (pcici_t tag, int unit) pci_map_mem(tag, PCI_MAP_REG_START, &virbase, &physbase); - printf("Mapped physbase %p to virbase %p\n", physbase, virbase); + printf("Mapped physbase %#lx to virbase %#lx\n", + (u_long)physbase, (u_long)virbase); cdevsw_add(&cdev, &xrpudevsw, NULL); devfs_add_devswf(&xrpudevsw, 0, DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "xrpu0", 0); + "xrpu0"); } #endif /* DEVFS */ diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c index dfa882942c50..c2a2a187ab72 100644 --- a/sys/scsi/pt.c +++ b/sys/scsi/pt.c @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pt.c,v 1.28 1998/06/17 14:13:14 bde Exp $ + * $Id: pt.c,v 1.29 1998/07/04 22:30:24 julian Exp $ */ #include "opt_bounce.h" @@ -209,7 +209,7 @@ ptstart(unit, flags) bp, flags) == SUCCESSFULLY_QUEUED) { } else { - printf("pt%ld: oops not queued\n", unit); + printf("pt%lu: oops not queued\n", (u_long)unit); bp->b_flags |= B_ERROR; bp->b_error = EIO; biodone(bp); diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c index d71d6b750044..69f22783180c 100644 --- a/sys/scsi/scsi_driver.c +++ b/sys/scsi/scsi_driver.c @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_driver.c,v 1.25 1997/09/02 04:37:57 bde Exp $ + * $Id: scsi_driver.c,v 1.26 1997/09/02 20:06:34 bde Exp $ * */ @@ -143,8 +143,8 @@ struct scsi_device *device) if (!errcode ) sc_link->flags |= SDEV_IS_OPEN; - SC_DEBUG(sc_link, SDEV_DB1, ("%sopen: dev=0x%lx (unit %ld) result %d\n", - device->name, dev, unit, errcode)); + SC_DEBUG(sc_link, SDEV_DB1, ("%sopen: dev=0x%lx (unit %lu) result %d\n", + device->name, (u_long)dev, (u_long)unit, errcode)); return errcode; } @@ -198,7 +198,7 @@ scsi_strategy(struct buf *bp, struct scsi_device *device) SC_DEBUG(sc_link, SDEV_DB2, ("\n%sstrategy ", device->name)); SC_DEBUG(sc_link, SDEV_DB1, ("%ld bytes @ blk%ld\n", - bp->b_bcount, bp->b_blkno)); + bp->b_bcount, (long)bp->b_blkno)); if (SCSI_CONTROL(bp->b_dev) || (device->dev_strategy == 0)) { diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 4d5b94c1165d..c63de3a1bfa1 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: scsi_ioctl.c,v 1.30 1998/03/28 10:33:21 bde Exp $ + * $Id: scsi_ioctl.c,v 1.31 1998/06/07 17:12:49 dfr Exp $ * * */ @@ -260,7 +260,7 @@ struct proc *p, struct scsi_link *sc_link) if (cmd != SCIOCIDENTIFY && cmd != SCIOCGETDEVINFO&& !(flags & FWRITE)) return EACCES; - SC_DEBUG(sc_link,SDEV_DB2,("scsi_do_ioctl(0x%x)\n",cmd)); + SC_DEBUG(sc_link,SDEV_DB2, ("scsi_do_ioctl(0x%lx)\n", cmd)); switch(cmd) { case SCIOCCOMMAND: diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 50a6a9558ae8..f805edc299be 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -16,7 +16,7 @@ * * New configuration setup: dufault@hda.com * - * $Id: scsiconf.c,v 1.106 1998/07/11 07:45:58 bde Exp $ + * $Id: scsiconf.c,v 1.107 1998/07/28 09:03:37 phk Exp $ */ #include "opt_scsi.h" @@ -1446,14 +1446,14 @@ scsi_probedev(sc_link, maybe_more, type_p) sc_print_start(sc_link); printf("<%s %s %s> ", manu, model, version ); - printf("type %ld %sSCSI %d" - ,type + printf("type %lu %sSCSI %d" + ,(u_long)type ,remov ? "removable " : "fixed " ,inqbuf->version & SID_ANSII ); if (qtype[0]) { sc_print_addr(sc_link); - printf(" qualifier %ld: %s" ,qualifier ,qtype); + printf(" qualifier %lu: %s", (u_long)qualifier, qtype); } printf("\n"); diff --git a/sys/scsi/sctarg.c b/sys/scsi/sctarg.c index f48792fcbd14..d2f8f6ff825a 100644 --- a/sys/scsi/sctarg.c +++ b/sys/scsi/sctarg.c @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sctarg.c,v 1.26 1998/06/17 14:13:14 bde Exp $ + * $Id: sctarg.c,v 1.27 1998/07/04 22:30:24 julian Exp $ */ #include "opt_bounce.h" @@ -248,7 +248,7 @@ sctargstart(unit, unused_flags) bp, flags | SCSI_NOSLEEP) == SUCCESSFULLY_QUEUED) { } else { - printf("sctarg%ld: oops not queued\n", unit); + printf("sctarg%lu: oops not queued\n", (u_long)unit); bp->b_flags |= B_ERROR; bp->b_error = EIO; biodone(bp); diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 21d1267ffe00..8bf2c3573ca8 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -12,7 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: st.c,v 1.91 1998/07/11 07:46:01 bde Exp $ + * $Id: st.c,v 1.92 1998/07/31 09:00:39 phk Exp $ */ /* @@ -272,22 +272,22 @@ stattach(struct scsi_link *sc_link) devfs_add_devswf(&st_cdevsw, (unit << 4 ) + (ii * 4), DV_CHR, UID_ROOT, GID_OPERATOR, 0660, - "rst%ld.%d", unit, ii); + "rst%lu.%d", (u_long)unit, ii); st->devfs_token.nrst_[ii] = devfs_add_devswf(&st_cdevsw, (unit << 4 ) + ((ii * 4) + 1), DV_CHR, UID_ROOT, GID_OPERATOR, 0660, - "nrst%ld.%d", unit, ii); + "nrst%lu.%d", (u_long)unit, ii); st->devfs_token.erst_[ii] = devfs_add_devswf(&st_cdevsw, (unit << 4 ) + ((ii * 4) + 2), DV_CHR, UID_ROOT, GID_OPERATOR, 0660, - "erst%ld.%d", unit, ii); + "erst%lu.%d", (u_long)unit, ii); st->devfs_token.ctl_[ii] = devfs_add_devswf(&st_cdevsw, (unit << 4 ) + ((ii * 4) + 3), DV_CHR, UID_ROOT, GID_OPERATOR, 0600, - "st%ldctl.%d", unit, ii); + "st%luctl.%d", (u_long)unit, ii); } st->devfs_token.ctl = @@ -296,11 +296,11 @@ stattach(struct scsi_link *sc_link) "rst%d.ctl", unit); /** add links **/ st->devfs_token.rst = - devfs_link(st->devfs_token.rst_[0], "rst%ld", unit); + devfs_link(st->devfs_token.rst_[0], "rst%lu", (u_long)unit); st->devfs_token.nrst = - devfs_link(st->devfs_token.nrst_[0], "nrst%ld", unit); + devfs_link(st->devfs_token.nrst_[0], "nrst%lu", (u_long)unit); st->devfs_token.erst = - devfs_link(st->devfs_token.erst_[0], "erst%ld", unit); + devfs_link(st->devfs_token.erst_[0], "erst%lu", (u_long)unit); #endif return 0; } diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c index 9310a8ee6c7b..1601d8e9f3c6 100644 --- a/sys/scsi/worm.c +++ b/sys/scsi/worm.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: worm.c,v 1.57 1998/06/17 14:13:15 bde Exp $ + * $Id: worm.c,v 1.58 1998/07/04 22:30:25 julian Exp $ */ #include "opt_bounce.h" @@ -276,7 +276,7 @@ wormattach(struct scsi_link *sc_link) struct scsi_data *worm = sc_link->sd; if (sc_link->devmodes == 0) - printf(", warning: unknown drive type", unit); + printf(", warning: unknown drive type"); bufq_init(&worm->buf_queue); @@ -444,7 +444,7 @@ wormstart(unit, flags) if ((bp->b_flags & B_READ) == B_WRITE) worm->worm_flags |= WORMFL_WRITTEN; } else { - printf("worm%ld: oops not queued\n", unit); + printf("worm%lu: oops not queued\n", (u_long)unit); if (bp) { bp->b_flags |= B_ERROR; bp->b_error = EIO; @@ -661,7 +661,7 @@ worm_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, */ unit = wormunit(dev); worm = sc_link->sd; - SC_DEBUG(sc_link, SDEV_DB2, ("wormioctl 0x%x ", cmd)); + SC_DEBUG(sc_link, SDEV_DB2, ("wormioctl 0x%lx ", cmd)); switch (cmd) { case WORMIOCPREPDISK: