Use device_printf where possible, and otherwise at least include the
driver name in printf strings. Reported by: Mark Johnston
This commit is contained in:
parent
75468fb55b
commit
e42c9c0204
@ -391,7 +391,7 @@ aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid)
|
||||
|
||||
if (aac_sync_fib(sc, ContainerCommand, 0, fib,
|
||||
sizeof(struct aac_mntinfo))) {
|
||||
printf("Error probing container %d\n", cid);
|
||||
device_printf(sc->aac_dev, "Error probing container %d\n", cid);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb)
|
||||
sc = camsc->inf->aac_sc;
|
||||
|
||||
if (sc == NULL) {
|
||||
printf("Null sc?\n");
|
||||
printf("aac: Null sc?\n");
|
||||
return (CAM_REQ_ABORTED);
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,9 @@ aac_disk_open(struct disk *dp)
|
||||
|
||||
/* check that the controller is up and running */
|
||||
if (sc->ad_controller->aac_state & AAC_STATE_SUSPEND) {
|
||||
printf("Controller Suspended controller state = 0x%x\n",
|
||||
sc->ad_controller->aac_state);
|
||||
device_printf(sc->ad_controller->aac_dev,
|
||||
"Controller Suspended controller state = 0x%x\n",
|
||||
sc->ad_controller->aac_state);
|
||||
return(ENXIO);
|
||||
}
|
||||
|
||||
@ -252,7 +253,8 @@ aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size
|
||||
if (!first) {
|
||||
first = 1;
|
||||
if (bus_dmamap_create(sc->aac_buffer_dmat, 0, &dump_datamap)) {
|
||||
printf("bus_dmamap_create failed\n");
|
||||
device_printf(sc->aac_dev,
|
||||
"bus_dmamap_create failed\n");
|
||||
return (ENOMEM);
|
||||
}
|
||||
}
|
||||
@ -305,8 +307,9 @@ aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size
|
||||
size += fib->Header.Size;
|
||||
|
||||
if (aac_sync_fib(sc, command, 0, fib, size)) {
|
||||
printf("Error dumping block 0x%jx\n",
|
||||
(uintmax_t)physical);
|
||||
device_printf(sc->aac_dev,
|
||||
"Error dumping block 0x%jx\n",
|
||||
(uintmax_t)physical);
|
||||
return (EIO);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user