diff options
author | krw <krw@openbsd.org> | 2019-09-20 15:35:42 +0000 |
---|---|---|
committer | krw <krw@openbsd.org> | 2019-09-20 15:35:42 +0000 |
commit | 7330cb3aad1b068eee6098edfc9816a95e85c452 (patch) | |
tree | 5121a1b93d6639d316ef8b3be03d81c61069a1d8 /sys/scsi/scsi_base.c | |
parent | Remove an unused function. (diff) | |
download | wireguard-openbsd-7330cb3aad1b068eee6098edfc9816a95e85c452.tar.xz wireguard-openbsd-7330cb3aad1b068eee6098edfc9816a95e85c452.zip |
Print inquiry and read capacity (10 and 16) data under SCSIDEBUG.
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r-- | sys/scsi/scsi_base.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 22a29278843..1bed1b8d9c0 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.229 2019/09/01 15:03:32 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.230 2019/09/20 15:35:42 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -852,6 +852,13 @@ scsi_inquire(struct scsi_link *link, struct scsi_inquiry_data *inqbuf, scsi_xs_put(xs); +#ifdef SCSIDEBUG + sc_print_addr(link); + printf("got %d of %u bytes of inquiry data:\n", + SID_INQUIRY_HDR + SID_SCSI2_ALEN, + inqbuf->additional_length + 4); + scsi_show_mem((u_char *)inqbuf, SID_INQUIRY_HDR + SID_SCSI2_ALEN); +#endif /* SCSIDEBUG */ return (error); } |