diff options
author | krw <krw@openbsd.org> | 2019-11-26 20:48:03 +0000 |
---|---|---|
committer | krw <krw@openbsd.org> | 2019-11-26 20:48:03 +0000 |
commit | ac47be6b6b9bf15f4cd35a2d8bf0cf83d913aa3d (patch) | |
tree | 16fa7cb938bc279c40d745c6bd4e2eb417b6cba9 /sys/scsi/scsi_base.c | |
parent | document that listen on socket can have filters attached (diff) | |
download | wireguard-openbsd-ac47be6b6b9bf15f4cd35a2d8bf0cf83d913aa3d.tar.xz wireguard-openbsd-ac47be6b6b9bf15f4cd35a2d8bf0cf83d913aa3d.zip |
Don't zero existing values for density, block_count and block_size in
scsi_do_mode_sense(). Just update the values when valid data is
available. Initialize the variables passed to scsi_do_mode_sense() in
the one instance where they weren't already set.
Fixes issue with softraid crypto volumes on 4K-sector disks.
Found, fix tested, and ok tim@
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r-- | sys/scsi/scsi_base.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 6bc723ea526..6c2cb6921d7 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.244 2019/11/25 17:02:56 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.245 2019/11/26 20:48:03 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -1169,12 +1169,6 @@ scsi_do_mode_sense(struct scsi_link *link, int page, *page_data = NULL; - if (density != NULL) - *density = 0; - if (block_count != NULL) - *block_count = 0; - if (block_size != NULL) - *block_size = 0; if (big != NULL) *big = 0; |