summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2016-04-13 15:57:13 +0000
committerscottl <scottl@FreeBSD.org>2016-04-13 15:57:13 +0000
commitc87a3c998c1cd3ed74f6233e2cb7682c6dec412f (patch)
tree29294042752779fc24361ab1fccc4ae83922fc83 /sys/cam
parenta9631932520f7bf37a07665c623cdb0cc19c9469 (diff)
downloadFreeBSD-src-c87a3c998c1cd3ed74f6233e2cb7682c6dec412f.zip
FreeBSD-src-c87a3c998c1cd3ed74f6233e2cb7682c6dec412f.tar.gz
Use scsi_cdb_sbuf() inside of scsi_command_string now that the temporary
string storage is no longer needed. MFC after: 3 days Sponsored by: Netflix
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_all.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index 0c40899..3a073ee 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -3579,7 +3579,6 @@ scsi_command_string(struct cam_device *device, struct ccb_scsiio *csio,
#endif /* _KERNEL/!_KERNEL */
{
struct scsi_inquiry_data *inq_data;
- char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
#ifdef _KERNEL
struct ccb_getdev *cgd;
#endif /* _KERNEL */
@@ -3612,15 +3611,13 @@ scsi_command_string(struct cam_device *device, struct ccb_scsiio *csio,
#endif /* _KERNEL/!_KERNEL */
if ((csio->ccb_h.flags & CAM_CDB_POINTER) != 0) {
- sbuf_printf(sb, "%s. CDB: %s",
- scsi_op_desc(csio->cdb_io.cdb_ptr[0], inq_data),
- scsi_cdb_string(csio->cdb_io.cdb_ptr, cdb_str,
- sizeof(cdb_str)));
+ sbuf_printf(sb, "%s. CDB: ",
+ scsi_op_desc(csio->cdb_io.cdb_ptr[0], inq_data));
+ scsi_cdb_sbuf(csio->cdb_io.cdb_ptr, sb);
} else {
- sbuf_printf(sb, "%s. CDB: %s",
- scsi_op_desc(csio->cdb_io.cdb_bytes[0], inq_data),
- scsi_cdb_string(csio->cdb_io.cdb_bytes, cdb_str,
- sizeof(cdb_str)));
+ sbuf_printf(sb, "%s. CDB: ",
+ scsi_op_desc(csio->cdb_io.cdb_bytes[0], inq_data));
+ scsi_cdb_sbuf(csio->cdb_io.cdb_bytes, sb);
}
#ifdef _KERNEL
OpenPOWER on IntegriCloud