diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -12837,7 +12837,7 @@ char path_str[64]; struct sbuf sb; - ctl_scsi_path_string(io, path_str, sizeof(path_str)); + ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str)); sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); ctl_io_sbuf(io, &sb); diff --git a/sys/cam/ctl/ctl_scsi_all.h b/sys/cam/ctl/ctl_scsi_all.h --- a/sys/cam/ctl/ctl_scsi_all.h +++ b/sys/cam/ctl/ctl_scsi_all.h @@ -43,7 +43,7 @@ int ctl_scsi_sense_sbuf(struct ctl_scsiio *ctsio, struct scsi_inquiry_data *inq_data, struct sbuf *sb, scsi_sense_string_flags flags); -void ctl_scsi_path_string(union ctl_io *io, char *path_str, int strlen); +void ctl_scsi_path_string(struct ctl_io_hdr *hdr, char *path_str, int strlen); char *ctl_scsi_sense_string(struct ctl_scsiio *ctsio, struct scsi_inquiry_data *inq_data, char *str, int str_len); diff --git a/sys/cam/ctl/ctl_scsi_all.c b/sys/cam/ctl/ctl_scsi_all.c --- a/sys/cam/ctl/ctl_scsi_all.c +++ b/sys/cam/ctl/ctl_scsi_all.c @@ -109,12 +109,12 @@ } void -ctl_scsi_path_string(union ctl_io *io, char *path_str, int len) +ctl_scsi_path_string(struct ctl_io_hdr *hdr, char *path_str, int len) { snprintf(path_str, len, "(%u:%u:%u/%u): ", - io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.targ_lun, io->io_hdr.nexus.targ_mapped_lun); + hdr->nexus.initid, hdr->nexus.targ_port, + hdr->nexus.targ_lun, hdr->nexus.targ_mapped_lun); } /* @@ -130,7 +130,7 @@ if ((ctsio == NULL) || (sb == NULL)) return(-1); - ctl_scsi_path_string((union ctl_io *)ctsio, path_str, sizeof(path_str)); + ctl_scsi_path_string(&ctsio->io_hdr, path_str, sizeof(path_str)); if (flags & SSS_FLAG_PRINT_COMMAND) { sbuf_cat(sb, path_str); diff --git a/sys/cam/ctl/ctl_util.c b/sys/cam/ctl/ctl_util.c --- a/sys/cam/ctl/ctl_util.c +++ b/sys/cam/ctl/ctl_util.c @@ -731,7 +731,7 @@ const char *task_desc; char path_str[64]; - ctl_scsi_path_string(io, path_str, sizeof(path_str)); + ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str)); switch (io->io_hdr.io_type) { case CTL_IO_SCSI: @@ -784,7 +784,7 @@ } } - ctl_scsi_path_string(io, path_str, sizeof(path_str)); + ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str)); sbuf_cat(sb, path_str); if (status_desc == NULL) @@ -861,7 +861,7 @@ return; if (io->scsiio.kern_sg_entries > 0) /* XXX: Implement */ return; - ctl_scsi_path_string(io, path_str, sizeof(path_str)); + ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str)); len = min(io->scsiio.kern_data_len, 4096); for (i = 0; i < len; ) { sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -1245,7 +1245,7 @@ goto bailout; } - ctl_scsi_path_string(io, scsi_path, sizeof(scsi_path)); + ctl_scsi_path_string(&io->io_hdr, scsi_path, sizeof(scsi_path)); if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { fprintf(stdout, "%s LUN %s successfully\n", scsi_path, (start) ? "started" : "stopped"); @@ -1966,7 +1966,7 @@ retval = 1; ctl_io_error_print(io, NULL, stderr); } else if (path_str != NULL) - ctl_scsi_path_string(io, path_str, path_len); + ctl_scsi_path_string(&io->io_hdr, path_str, path_len); bailout: ctl_scsi_free_io(io); @@ -2364,7 +2364,7 @@ } if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { char scsi_path[40]; - ctl_scsi_path_string(io, scsi_path, sizeof(scsi_path)); + ctl_scsi_path_string(&io->io_hdr, scsi_path, sizeof(scsi_path)); fprintf( stdout, "%sPERSISTENT RESERVE OUT executed " "successfully\n", scsi_path); } else