summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2014-05-10 11:49:31 +0000
committerkettenis <kettenis@openbsd.org>2014-05-10 11:49:31 +0000
commit02aa388cfaea5a987e390ebd14530bd07919354c (patch)
tree406bc48b11b2788b425bc47bac2bd41a19f49fd0
parentExtend the connection and session FSMs so that connection failure is (diff)
downloadwireguard-openbsd-02aa388cfaea5a987e390ebd14530bd07919354c.tar.xz
wireguard-openbsd-02aa388cfaea5a987e390ebd14530bd07919354c.zip
Some straightforward format string fixes. Also, print both the tx and rx
interrupt vector numbers instead of printing rx; pointed out by florian@
-rw-r--r--sys/arch/sparc64/dev/vcctty.c6
-rw-r--r--sys/arch/sparc64/dev/vcons.c4
-rw-r--r--sys/arch/sparc64/dev/vdsk.c4
-rw-r--r--sys/arch/sparc64/dev/vdsp.c6
-rw-r--r--sys/arch/sparc64/dev/vldcp.c6
-rw-r--r--sys/arch/sparc64/dev/vnet.c4
-rw-r--r--sys/arch/sparc64/dev/vpci.c6
7 files changed, 18 insertions, 18 deletions
diff --git a/sys/arch/sparc64/dev/vcctty.c b/sys/arch/sparc64/dev/vcctty.c
index 33858c337c6..4409c8f8433 100644
--- a/sys/arch/sparc64/dev/vcctty.c
+++ b/sys/arch/sparc64/dev/vcctty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vcctty.c,v 1.10 2012/12/02 19:40:45 kettenis Exp $ */
+/* $OpenBSD: vcctty.c,v 1.11 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -111,7 +111,7 @@ vcctty_attach(struct device *parent, struct device *self, void *aux)
printf(": can't map interrupt\n");
return;
}
- printf(": ivec 0x%lx, 0x%lx", sc->sc_tx_sysino, sc->sc_rx_sysino);
+ printf(": ivec 0x%llx, 0x%llx", sc->sc_tx_sysino, sc->sc_rx_sysino);
/*
* Un-configure queues before registering interrupt handlers,
@@ -153,7 +153,7 @@ vcctty_attach(struct device *parent, struct device *self, void *aux)
err = hv_ldc_rx_qconf(lc->lc_id,
lc->lc_rxq->lq_map->dm_segs[0].ds_addr, lc->lc_rxq->lq_nentries);
if (err != H_EOK)
- printf("%d: hv_ldc_rx_qconf %d\n", __func__, err);
+ printf("%s: hv_ldc_rx_qconf %d\n", __func__, err);
cbus_intr_setenabled(sc->sc_tx_sysino, INTR_ENABLED);
cbus_intr_setenabled(sc->sc_rx_sysino, INTR_ENABLED);
diff --git a/sys/arch/sparc64/dev/vcons.c b/sys/arch/sparc64/dev/vcons.c
index e635f090d2f..da5465685f5 100644
--- a/sys/arch/sparc64/dev/vcons.c
+++ b/sys/arch/sparc64/dev/vcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vcons.c,v 1.13 2013/07/16 19:46:56 kettenis Exp $ */
+/* $OpenBSD: vcons.c,v 1.14 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
@@ -88,7 +88,7 @@ vcons_attach(struct device *parent, struct device *self, void *aux)
if (vbus_intr_map(va->va_node, va->va_intr[0], &sysino))
printf(": can't map interrupt\n");
- printf(": ivec 0x%lx", sysino);
+ printf(": ivec 0x%llx", sysino);
sc->sc_ih = bus_intr_establish(va->va_bustag, sysino, IPL_TTY,
BUS_INTR_ESTABLISH_MPSAFE, vcons_intr, sc, sc->sc_dv.dv_xname);
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c
index c868f15386f..9dcdba71c9d 100644
--- a/sys/arch/sparc64/dev/vdsk.c
+++ b/sys/arch/sparc64/dev/vdsk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsk.c,v 1.37 2014/04/03 09:15:06 mpi Exp $ */
+/* $OpenBSD: vdsk.c,v 1.38 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2009, 2011 Mark Kettenis
*
@@ -243,7 +243,7 @@ vdsk_attach(struct device *parent, struct device *self, void *aux)
printf(": can't map interrupt\n");
return;
}
- printf(": ivec 0x%lx, 0x%lx", sysino[0], sysino[1]);
+ printf(": ivec 0x%llx, 0x%llx", sysino[0], sysino[1]);
/*
* Un-configure queues before registering interrupt handlers,
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c
index 0e26bc6d6cd..4133738a7c6 100644
--- a/sys/arch/sparc64/dev/vdsp.c
+++ b/sys/arch/sparc64/dev/vdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsp.c,v 1.25 2014/04/03 09:15:06 mpi Exp $ */
+/* $OpenBSD: vdsp.c,v 1.26 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2009, 2011, 2014 Mark Kettenis
*
@@ -331,7 +331,7 @@ vdsp_attach(struct device *parent, struct device *self, void *aux)
printf(": can't map interrupt\n");
return;
}
- printf(": ivec 0x%lx, 0x%lx", sc->sc_tx_sysino, sc->sc_tx_sysino);
+ printf(": ivec 0x%llx, 0x%llx", sc->sc_tx_sysino, sc->sc_rx_sysino);
/*
* Un-configure queues before registering interrupt handlers,
@@ -1665,7 +1665,7 @@ vdspopen(dev_t dev, int flag, int mode, struct proc *p)
err = hv_ldc_rx_qconf(lc->lc_id,
lc->lc_rxq->lq_map->dm_segs[0].ds_addr, lc->lc_rxq->lq_nentries);
if (err != H_EOK)
- printf("%s: hv_ldc_rx_qconf %d\n", err, __func__);
+ printf("%s: hv_ldc_rx_qconf %d\n", __func__, err);
cbus_intr_setenabled(sc->sc_tx_sysino, INTR_ENABLED);
cbus_intr_setenabled(sc->sc_rx_sysino, INTR_ENABLED);
diff --git a/sys/arch/sparc64/dev/vldcp.c b/sys/arch/sparc64/dev/vldcp.c
index f0ab1c156d0..f71648b784a 100644
--- a/sys/arch/sparc64/dev/vldcp.c
+++ b/sys/arch/sparc64/dev/vldcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vldcp.c,v 1.7 2014/04/03 09:15:06 mpi Exp $ */
+/* $OpenBSD: vldcp.c,v 1.8 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2009, 2012 Mark Kettenis
*
@@ -139,7 +139,7 @@ vldcp_attach(struct device *parent, struct device *self, void *aux)
printf(": can't map interrupt\n");
return;
}
- printf(": ivec 0x%lx, 0x%lx", sc->sc_tx_sysino, sc->sc_rx_sysino);
+ printf(": ivec 0x%llx, 0x%llx", sc->sc_tx_sysino, sc->sc_rx_sysino);
/*
* Un-configure queues before registering interrupt handlers,
@@ -313,7 +313,7 @@ vldcpopen(dev_t dev, int flag, int mode, struct proc *p)
err = hv_ldc_rx_qconf(lc->lc_id,
lc->lc_rxq->lq_map->dm_segs[0].ds_addr, lc->lc_rxq->lq_nentries);
if (err != H_EOK)
- printf("%d: hv_ldc_rx_qconf %d\n", __func__, err);
+ printf("%s: hv_ldc_rx_qconf %d\n", __func__, err);
/* Clear a pending channel reset. */
err = hv_ldc_rx_get_state(lc->lc_id, &rx_head, &rx_tail, &rx_state);
diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c
index 9fd0e2f98f7..cb7554a5647 100644
--- a/sys/arch/sparc64/dev/vnet.c
+++ b/sys/arch/sparc64/dev/vnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnet.c,v 1.30 2014/04/03 09:15:06 mpi Exp $ */
+/* $OpenBSD: vnet.c,v 1.31 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -258,7 +258,7 @@ vnet_attach(struct device *parent, struct device *self, void *aux)
printf(": can't map interrupt\n");
return;
}
- printf(": ivec 0x%lx, 0x%lx", sc->sc_tx_sysino, sc->sc_rx_sysino);
+ printf(": ivec 0x%llx, 0x%llx", sc->sc_tx_sysino, sc->sc_rx_sysino);
/*
* Un-configure queues before registering interrupt handlers,
diff --git a/sys/arch/sparc64/dev/vpci.c b/sys/arch/sparc64/dev/vpci.c
index 1cd356e3f00..cad8e10d7f9 100644
--- a/sys/arch/sparc64/dev/vpci.c
+++ b/sys/arch/sparc64/dev/vpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vpci.c,v 1.13 2014/01/24 05:42:23 kettenis Exp $ */
+/* $OpenBSD: vpci.c,v 1.14 2014/05/10 11:49:31 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org>
*
@@ -532,13 +532,13 @@ vpci_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle,
err = hv_pci_msi_setmsiq(pbm->vp_devhandle, msinum, 0, 0);
if (err != H_EOK) {
- printf("pci_msi_setmsiq: err %ld\n", err);
+ printf("pci_msi_setmsiq: err %d\n", err);
return (NULL);
}
err = hv_pci_msi_setvalid(pbm->vp_devhandle, msinum, PCI_MSI_VALID);
if (err != H_EOK) {
- printf("pci_msi_setvalid: err %ld\n", err);
+ printf("pci_msi_setvalid: err %d\n", err);
return (NULL);
}