aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_scsi_all.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2014-10-16 08:42:17 +0000
committerAlexander Motin <mav@FreeBSD.org>2014-10-16 08:42:17 +0000
commit218d5d4be29be772e47380812ee9cf689da375f2 (patch)
treeeea23510a2d040c62937986d30396d8f9e492281 /sys/cam/ctl/ctl_scsi_all.c
parent75afaef266e765b5ecaf0f8c3c55fb600ee26d62 (diff)
downloadsrc-218d5d4be29be772e47380812ee9cf689da375f2.tar.gz
src-218d5d4be29be772e47380812ee9cf689da375f2.zip
Implement more functional CTL debug logging.
Setting bits in kern.cam.ctl.debug allows to log errors, commands and some commands data respectively. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=273163
Diffstat (limited to 'sys/cam/ctl/ctl_scsi_all.c')
-rw-r--r--sys/cam/ctl/ctl_scsi_all.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/sys/cam/ctl/ctl_scsi_all.c b/sys/cam/ctl/ctl_scsi_all.c
index 91b79f3f81e9..815e383c0725 100644
--- a/sys/cam/ctl/ctl_scsi_all.c
+++ b/sys/cam/ctl/ctl_scsi_all.c
@@ -112,32 +112,10 @@ ctl_scsi_command_string(struct ctl_scsiio *ctsio,
void
ctl_scsi_path_string(union ctl_io *io, char *path_str, int len)
{
- if (io->io_hdr.nexus.targ_target.wwid[0] == 0) {
- snprintf(path_str, len, "(%ju:%d:%ju:%d): ",
- (uintmax_t)io->io_hdr.nexus.initid.id,
- io->io_hdr.nexus.targ_port,
- (uintmax_t)io->io_hdr.nexus.targ_target.id,
- io->io_hdr.nexus.targ_lun);
- } else {
- /*
- * XXX KDM find a better way to display FC WWIDs.
- */
-#ifdef _KERNEL
- snprintf(path_str, len, "(%ju:%d:%#jx,%#jx:%d): ",
- (uintmax_t)io->io_hdr.nexus.initid.id,
- io->io_hdr.nexus.targ_port,
- (intmax_t)io->io_hdr.nexus.targ_target.wwid[0],
- (intmax_t)io->io_hdr.nexus.targ_target.wwid[1],
- io->io_hdr.nexus.targ_lun);
-#else /* _KERNEL */
- snprintf(path_str, len, "(%ju:%d:%#jx,%#jx:%d): ",
- (uintmax_t)io->io_hdr.nexus.initid.id,
- io->io_hdr.nexus.targ_port,
- (intmax_t)io->io_hdr.nexus.targ_target.wwid[0],
- (intmax_t)io->io_hdr.nexus.targ_target.wwid[1],
- io->io_hdr.nexus.targ_lun);
-#endif /* _KERNEL */
- }
+
+ snprintf(path_str, len, "(%u:%u:%u/%u): ",
+ io->io_hdr.nexus.initid.id, io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_lun, io->io_hdr.nexus.targ_mapped_lun);
}
/*