diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-11-09 12:15:51 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-11-09 12:15:51 +0000 |
commit | afcc405018f894692c6140cc328cf3f54156aae4 (patch) | |
tree | 5d6c2470a771edbb65ab47aeba9f64fdf5d10544 /sys/scsi | |
parent | 1de60d9f85bd0d4a609194bc24ff88c86230b0b2 (diff) |
Fix SCSIDEBUG display of VPD inquiry data.
Remove extraneous whitespace in SCSIDEBUG read capacity display.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_base.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 175ed9c2256..740a1ef4eb3 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.237 2019/09/29 17:57:36 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.238 2019/11/09 12:15:50 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -905,11 +905,15 @@ scsi_inquire_vpd(struct scsi_link *link, void *buf, u_int buflen, scsi_xs_put(xs); #ifdef SCSIDEBUG - bytes = _2btol(((struct scsi_vpd_hdr *)buf)->page_length); sc_print_addr(link); - printf("got %u bytes of VPD inquiry page %u data:\n", bytes, - page); - scsi_show_mem(buf, bytes); + if (error == 0) { + bytes = _2btol(((struct scsi_vpd_hdr *)buf)->page_length); + printf("got %u of %u bytes of VPD inquiry page %u data:\n", buflen, + bytes, page); + scsi_show_mem(buf, buflen); + } else { + printf("VPD inquiry page %u not available\n", page); + } #endif /* SCSIDEBUG */ return (error); } |