mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Fix printf format bugs.
This commit is contained in:
parent
cde5024e09
commit
6954e80f7b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39324
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: aha.c,v 1.1 1998/09/15 07:39:52 gibbs Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -513,7 +513,8 @@ aha_init(struct aha_softc* aha)
|
||||
ahaallocccbs(aha);
|
||||
|
||||
if (aha->num_ccbs == 0) {
|
||||
printf("%s: aha_init - Unable to allocate initial ccbs\n");
|
||||
printf("%s: aha_init - Unable to allocate initial ccbs\n",
|
||||
aha_name(aha));
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
@ -1011,7 +1012,7 @@ ahaexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
|
||||
if (error != 0) {
|
||||
if (error != EFBIG)
|
||||
printf("%s: Unexepected error 0x%x returned from "
|
||||
"bus_dmamap_load\n", aha_name(aha));
|
||||
"bus_dmamap_load\n", aha_name(aha), error);
|
||||
if (ccb->ccb_h.status == CAM_REQ_INPROG) {
|
||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||
ccb->ccb_h.status = CAM_REQ_TOO_BIG|CAM_DEV_QFRZN;
|
||||
@ -1139,7 +1140,7 @@ ahadone(struct aha_softc *aha, struct aha_ccb *bccb, aha_mbi_comp_code_t comp_co
|
||||
|
||||
if ((bccb->flags & BCCB_ACTIVE) == 0) {
|
||||
printf("%s: ahadone - Attempt to free non-active BCCB 0x%x\n",
|
||||
aha_name(aha), bccb);
|
||||
aha_name(aha), (intptr_t)bccb);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1362,7 +1363,8 @@ ahareset(struct aha_softc* aha, int hard_reset)
|
||||
aha_name(aha));
|
||||
|
||||
if ((status & DATAIN_REG_READY) != 0)
|
||||
printf("%s: ahareset - Host Adapter Error code = 0x%x\n",
|
||||
printf("%s: ahareset - Host Adapter Error "
|
||||
"code = 0x%x\n", aha_name(aha),
|
||||
aha_inb(aha, DATAIN_REG));
|
||||
return (ENXIO);
|
||||
}
|
||||
@ -1677,13 +1679,14 @@ ahatimeout(void *arg)
|
||||
ccb = bccb->ccb;
|
||||
aha = (struct aha_softc *)ccb->ccb_h.ccb_aha_ptr;
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("CCB 0x%x - timed out\n", bccb);
|
||||
printf("CCB 0x%x - timed out\n", (intptr_t)bccb);
|
||||
|
||||
s = splcam();
|
||||
|
||||
if ((bccb->flags & BCCB_ACTIVE) == 0) {
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("CCB 0x%x - timed out CCB already completed\n", bccb);
|
||||
printf("CCB 0x%x - timed out CCB already completed\n",
|
||||
(intptr_t)bccb);
|
||||
splx(s);
|
||||
return;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: ahb.c,v 1.1 1998/09/15 07:10:00 gibbs Exp $
|
||||
*/
|
||||
|
||||
#include "eisa.h"
|
||||
@ -178,7 +178,7 @@ ahbqueuembox(struct ahb_softc *ahb, u_int32_t mboxval, u_int attn_code)
|
||||
DELAY(20);
|
||||
}
|
||||
if (loopmax == 0)
|
||||
panic("ahb%d: adapter not taking commands\n", ahb->unit);
|
||||
panic("ahb%ld: adapter not taking commands\n", ahb->unit);
|
||||
|
||||
ahb_outl(ahb, MBOXOUT0, mboxval);
|
||||
ahb_outb(ahb, ATTN, attn_code);
|
||||
@ -410,7 +410,7 @@ ahballoc(u_long unit, u_int iobase, u_int irq)
|
||||
*/
|
||||
ahb = malloc(sizeof(struct ahb_softc), M_TEMP, M_NOWAIT);
|
||||
if (!ahb) {
|
||||
printf("ahb%d: cannot malloc!\n", unit);
|
||||
printf("ahb%ld: cannot malloc!\n", unit);
|
||||
return (NULL);
|
||||
}
|
||||
bzero(ahb, sizeof(struct ahb_softc));
|
||||
@ -531,7 +531,7 @@ ahbxptattach(struct ahb_softc *ahb)
|
||||
|
||||
ahb->num_ecbs = MIN(ahb->num_ecbs,
|
||||
ahb->ha_inq_data->scsi_data.reserved[1]);
|
||||
printf("ahb%d: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n",
|
||||
printf("ahb%ld: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n",
|
||||
ahb->unit, ahb->ha_inq_data->scsi_data.product,
|
||||
(ahb->ha_inq_data->scsi_data.flags & 0x4) ? "Differential"
|
||||
: "Single Ended",
|
||||
@ -588,8 +588,8 @@ ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
|
||||
u_int target_id;
|
||||
|
||||
if (ahb->immed_cmd == 0) {
|
||||
printf("ahb%d: Immediate Command complete with no "
|
||||
" pending command\n");
|
||||
printf("ahb%ld: Immediate Command complete with no "
|
||||
" pending command\n", ahb->unit);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -630,11 +630,11 @@ ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
|
||||
|
||||
if (ahb->immed_ecb != NULL) {
|
||||
ahb->immed_ecb = NULL;
|
||||
printf("ahb%d: No longer in timeout\n", ahb->unit);
|
||||
printf("ahb%ld: No longer in timeout\n", ahb->unit);
|
||||
} else if (target_id == ahb->scsi_id)
|
||||
printf("ahb%d: SCSI Bus Reset Delivered\n", ahb->unit);
|
||||
printf("ahb%ld: SCSI Bus Reset Delivered\n", ahb->unit);
|
||||
else
|
||||
printf("ahb%d: Bus Device Reset Delibered to target %d\n",
|
||||
printf("ahb%ld: Bus Device Reset Delibered to target %d\n",
|
||||
ahb->unit, target_id);
|
||||
|
||||
ahb->immed_cmd = 0;
|
||||
@ -764,7 +764,7 @@ ahbprocesserror(struct ahb_softc *ahb, struct ecb *ecb, union ccb *ccb)
|
||||
case HS_INVALID_CMD_LINK:
|
||||
case HS_INVALID_ECB_PARAM:
|
||||
case HS_PROGRAM_CKSUM_ERROR:
|
||||
panic("ahb%d: Can't happen host status %x occurred",
|
||||
panic("ahb%ld: Can't happen host status %x occurred",
|
||||
ahb->unit, status->ha_status);
|
||||
break;
|
||||
}
|
||||
@ -813,7 +813,7 @@ ahbdone(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
|
||||
} else {
|
||||
/* Non CCB Command */
|
||||
if ((intstat & INTSTAT_MASK) != INTSTAT_ECB_OK) {
|
||||
printf("ahb%d: Command 0%x Failed %x:%x:%x\n",
|
||||
printf("ahb%ld: Command 0%x Failed %x:%x:%x\n",
|
||||
ahb->unit, ecb->hecb.opcode,
|
||||
*((u_int16_t*)&ecb->status),
|
||||
ecb->status.ha_status, ecb->status.resid_count);
|
||||
@ -900,8 +900,8 @@ ahbexecuteecb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
|
||||
|
||||
if (error != 0) {
|
||||
if (error != EFBIG)
|
||||
printf("ahb%d: Unexepected error 0x%x returned from "
|
||||
"bus_dmamap_load\n", ahb->unit);
|
||||
printf("ahb%ld: Unexepected error 0x%x returned from "
|
||||
"bus_dmamap_load\n", ahb->unit, error);
|
||||
if (ccb->ccb_h.status == CAM_REQ_INPROG) {
|
||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||
ccb->ccb_h.status = CAM_REQ_TOO_BIG|CAM_DEV_QFRZN;
|
||||
@ -1259,13 +1259,14 @@ ahbtimeout(void *arg)
|
||||
ccb = ecb->ccb;
|
||||
ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr;
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("ECB 0x%x - timed out\n", ecb);
|
||||
printf("ECB 0x%x - timed out\n", (intptr_t)ecb);
|
||||
|
||||
s = splcam();
|
||||
|
||||
if ((ecb->state & ECB_ACTIVE) == 0) {
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("ECB 0x%x - timed out ECB already completed\n", ecb);
|
||||
printf("ECB 0x%x - timed out ECB already completed\n",
|
||||
(intptr_t)ecb);
|
||||
splx(s);
|
||||
return;
|
||||
}
|
||||
@ -1311,7 +1312,7 @@ ahbtimeout(void *arg)
|
||||
* later which will attempt a bus reset.
|
||||
*/
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("Queuing BDR\n", ecb);
|
||||
printf("Queuing BDR\n");
|
||||
ecb->state |= ECB_DEVICE_RESET;
|
||||
ccb->ccb_h.timeout_ch =
|
||||
timeout(ahbtimeout, (caddr_t)ecb, 2 * hz);
|
||||
@ -1324,7 +1325,7 @@ ahbtimeout(void *arg)
|
||||
* have already attempted to clear the condition with a BDR.
|
||||
*/
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("Attempting SCSI Bus reset\n", ecb);
|
||||
printf("Attempting SCSI Bus reset\n");
|
||||
ecb->state |= ECB_SCSIBUS_RESET;
|
||||
ccb->ccb_h.timeout_ch =
|
||||
timeout(ahbtimeout, (caddr_t)ecb, 2 * hz);
|
||||
|
@ -29,7 +29,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: bt.c,v 1.1 1998/09/15 07:32:48 gibbs Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -738,7 +738,8 @@ bt_init(struct bt_softc* bt)
|
||||
btallocccbs(bt);
|
||||
|
||||
if (bt->num_ccbs == 0) {
|
||||
printf("%s: bt_init - Unable to allocate initial ccbs\n");
|
||||
printf("%s: bt_init - Unable to allocate initial ccbs\n",
|
||||
bt_name(bt));
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
@ -1268,7 +1269,7 @@ btexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
|
||||
if (error != 0) {
|
||||
if (error != EFBIG)
|
||||
printf("%s: Unexepected error 0x%x returned from "
|
||||
"bus_dmamap_load\n", bt_name(bt));
|
||||
"bus_dmamap_load\n", bt_name(bt), error);
|
||||
if (ccb->ccb_h.status == CAM_REQ_INPROG) {
|
||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||
ccb->ccb_h.status = CAM_REQ_TOO_BIG|CAM_DEV_QFRZN;
|
||||
@ -1392,7 +1393,7 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code)
|
||||
|
||||
if ((bccb->flags & BCCB_ACTIVE) == 0) {
|
||||
printf("%s: btdone - Attempt to free non-active BCCB 0x%x\n",
|
||||
bt_name(bt), bccb);
|
||||
bt_name(bt), (intptr_t)bccb);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1660,7 +1661,7 @@ btreset(struct bt_softc* bt, int hard_reset)
|
||||
|
||||
if ((status & DATAIN_REG_READY) != 0)
|
||||
printf("%s: btreset - Host Adapter Error code = 0x%x\n",
|
||||
bt_inb(bt, DATAIN_REG));
|
||||
bt_name(bt), bt_inb(bt, DATAIN_REG));
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
@ -2059,13 +2060,14 @@ bttimeout(void *arg)
|
||||
ccb = bccb->ccb;
|
||||
bt = (struct bt_softc *)ccb->ccb_h.ccb_bt_ptr;
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("CCB 0x%x - timed out\n", bccb);
|
||||
printf("CCB 0x%x - timed out\n", (intptr_t)bccb);
|
||||
|
||||
s = splcam();
|
||||
|
||||
if ((bccb->flags & BCCB_ACTIVE) == 0) {
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("CCB 0x%x - timed out CCB already completed\n", bccb);
|
||||
printf("CCB 0x%x - timed out CCB already completed\n",
|
||||
(intptr_t)bccb);
|
||||
splx(s);
|
||||
return;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: ahb.c,v 1.1 1998/09/15 07:10:00 gibbs Exp $
|
||||
*/
|
||||
|
||||
#include "eisa.h"
|
||||
@ -178,7 +178,7 @@ ahbqueuembox(struct ahb_softc *ahb, u_int32_t mboxval, u_int attn_code)
|
||||
DELAY(20);
|
||||
}
|
||||
if (loopmax == 0)
|
||||
panic("ahb%d: adapter not taking commands\n", ahb->unit);
|
||||
panic("ahb%ld: adapter not taking commands\n", ahb->unit);
|
||||
|
||||
ahb_outl(ahb, MBOXOUT0, mboxval);
|
||||
ahb_outb(ahb, ATTN, attn_code);
|
||||
@ -410,7 +410,7 @@ ahballoc(u_long unit, u_int iobase, u_int irq)
|
||||
*/
|
||||
ahb = malloc(sizeof(struct ahb_softc), M_TEMP, M_NOWAIT);
|
||||
if (!ahb) {
|
||||
printf("ahb%d: cannot malloc!\n", unit);
|
||||
printf("ahb%ld: cannot malloc!\n", unit);
|
||||
return (NULL);
|
||||
}
|
||||
bzero(ahb, sizeof(struct ahb_softc));
|
||||
@ -531,7 +531,7 @@ ahbxptattach(struct ahb_softc *ahb)
|
||||
|
||||
ahb->num_ecbs = MIN(ahb->num_ecbs,
|
||||
ahb->ha_inq_data->scsi_data.reserved[1]);
|
||||
printf("ahb%d: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n",
|
||||
printf("ahb%ld: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n",
|
||||
ahb->unit, ahb->ha_inq_data->scsi_data.product,
|
||||
(ahb->ha_inq_data->scsi_data.flags & 0x4) ? "Differential"
|
||||
: "Single Ended",
|
||||
@ -588,8 +588,8 @@ ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
|
||||
u_int target_id;
|
||||
|
||||
if (ahb->immed_cmd == 0) {
|
||||
printf("ahb%d: Immediate Command complete with no "
|
||||
" pending command\n");
|
||||
printf("ahb%ld: Immediate Command complete with no "
|
||||
" pending command\n", ahb->unit);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -630,11 +630,11 @@ ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
|
||||
|
||||
if (ahb->immed_ecb != NULL) {
|
||||
ahb->immed_ecb = NULL;
|
||||
printf("ahb%d: No longer in timeout\n", ahb->unit);
|
||||
printf("ahb%ld: No longer in timeout\n", ahb->unit);
|
||||
} else if (target_id == ahb->scsi_id)
|
||||
printf("ahb%d: SCSI Bus Reset Delivered\n", ahb->unit);
|
||||
printf("ahb%ld: SCSI Bus Reset Delivered\n", ahb->unit);
|
||||
else
|
||||
printf("ahb%d: Bus Device Reset Delibered to target %d\n",
|
||||
printf("ahb%ld: Bus Device Reset Delibered to target %d\n",
|
||||
ahb->unit, target_id);
|
||||
|
||||
ahb->immed_cmd = 0;
|
||||
@ -764,7 +764,7 @@ ahbprocesserror(struct ahb_softc *ahb, struct ecb *ecb, union ccb *ccb)
|
||||
case HS_INVALID_CMD_LINK:
|
||||
case HS_INVALID_ECB_PARAM:
|
||||
case HS_PROGRAM_CKSUM_ERROR:
|
||||
panic("ahb%d: Can't happen host status %x occurred",
|
||||
panic("ahb%ld: Can't happen host status %x occurred",
|
||||
ahb->unit, status->ha_status);
|
||||
break;
|
||||
}
|
||||
@ -813,7 +813,7 @@ ahbdone(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
|
||||
} else {
|
||||
/* Non CCB Command */
|
||||
if ((intstat & INTSTAT_MASK) != INTSTAT_ECB_OK) {
|
||||
printf("ahb%d: Command 0%x Failed %x:%x:%x\n",
|
||||
printf("ahb%ld: Command 0%x Failed %x:%x:%x\n",
|
||||
ahb->unit, ecb->hecb.opcode,
|
||||
*((u_int16_t*)&ecb->status),
|
||||
ecb->status.ha_status, ecb->status.resid_count);
|
||||
@ -900,8 +900,8 @@ ahbexecuteecb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
|
||||
|
||||
if (error != 0) {
|
||||
if (error != EFBIG)
|
||||
printf("ahb%d: Unexepected error 0x%x returned from "
|
||||
"bus_dmamap_load\n", ahb->unit);
|
||||
printf("ahb%ld: Unexepected error 0x%x returned from "
|
||||
"bus_dmamap_load\n", ahb->unit, error);
|
||||
if (ccb->ccb_h.status == CAM_REQ_INPROG) {
|
||||
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
|
||||
ccb->ccb_h.status = CAM_REQ_TOO_BIG|CAM_DEV_QFRZN;
|
||||
@ -1259,13 +1259,14 @@ ahbtimeout(void *arg)
|
||||
ccb = ecb->ccb;
|
||||
ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr;
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("ECB 0x%x - timed out\n", ecb);
|
||||
printf("ECB 0x%x - timed out\n", (intptr_t)ecb);
|
||||
|
||||
s = splcam();
|
||||
|
||||
if ((ecb->state & ECB_ACTIVE) == 0) {
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("ECB 0x%x - timed out ECB already completed\n", ecb);
|
||||
printf("ECB 0x%x - timed out ECB already completed\n",
|
||||
(intptr_t)ecb);
|
||||
splx(s);
|
||||
return;
|
||||
}
|
||||
@ -1311,7 +1312,7 @@ ahbtimeout(void *arg)
|
||||
* later which will attempt a bus reset.
|
||||
*/
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("Queuing BDR\n", ecb);
|
||||
printf("Queuing BDR\n");
|
||||
ecb->state |= ECB_DEVICE_RESET;
|
||||
ccb->ccb_h.timeout_ch =
|
||||
timeout(ahbtimeout, (caddr_t)ecb, 2 * hz);
|
||||
@ -1324,7 +1325,7 @@ ahbtimeout(void *arg)
|
||||
* have already attempted to clear the condition with a BDR.
|
||||
*/
|
||||
xpt_print_path(ccb->ccb_h.path);
|
||||
printf("Attempting SCSI Bus reset\n", ecb);
|
||||
printf("Attempting SCSI Bus reset\n");
|
||||
ecb->state |= ECB_SCSIBUS_RESET;
|
||||
ccb->ccb_h.timeout_ch =
|
||||
timeout(ahbtimeout, (caddr_t)ecb, 2 * hz);
|
||||
|
Loading…
Reference in New Issue
Block a user