diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-06-03 15:50:11 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-06-03 15:50:11 +0000 |
commit | 50c427201f2890c31ee7e168ca49ebfd3ea711b3 (patch) | |
tree | c13a5cba1b9b6ee7aac014bb034ed82a4c06c083 /sys/scsi/sd_scsi.c | |
parent | b29aa26e76ea903911cfcbf39ed29279ac12232a (diff) |
Tweak scsi_do_mode_sense(). NetBSD was right and I was wrong. Sigh.
Add 'big' parameter to report which mode sense header type is being
returned. Eliminate icky pointer arithmetic, since it won't work if
only block descriptors are returned by the device.
No functional change.
Diffstat (limited to 'sys/scsi/sd_scsi.c')
-rw-r--r-- | sys/scsi/sd_scsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/scsi/sd_scsi.c b/sys/scsi/sd_scsi.c index c1ffd2b4510..b1713a2b8d8 100644 --- a/sys/scsi/sd_scsi.c +++ b/sys/scsi/sd_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd_scsi.c,v 1.13 2005/05/28 06:16:33 krw Exp $ */ +/* $OpenBSD: sd_scsi.c,v 1.14 2005/06/03 15:50:10 krw Exp $ */ /* $NetBSD: sd_scsi.c,v 1.8 1998/10/08 20:21:13 thorpej Exp $ */ /*- @@ -155,7 +155,7 @@ sd_scsibus_get_parms(sd, dp, flags) error = scsi_do_mode_sense(sd->sc_link, page = 4, &buf, (void **)&sense_pages, NULL, NULL, &blksize, - sizeof(sense_pages->rigid_geometry), flags | SCSI_SILENT); + sizeof(sense_pages->rigid_geometry), flags | SCSI_SILENT, NULL); if (error == 0) { if (sense_pages) { SC_DEBUG(sd->sc_link, SDEV_DB3, @@ -194,7 +194,7 @@ sd_scsibus_get_parms(sd, dp, flags) error = scsi_do_mode_sense(sd->sc_link, page = 5, &buf, (void **)&sense_pages, NULL, NULL, &blksize, - sizeof(sense_pages->flex_geometry), flags | SCSI_SILENT); + sizeof(sense_pages->flex_geometry), flags | SCSI_SILENT, NULL); if (error == 0) { if (sense_pages) { dp->heads = sense_pages->flex_geometry.nheads; @@ -226,7 +226,7 @@ sd_scsibus_get_parms(sd, dp, flags) error = scsi_do_mode_sense(sd->sc_link, page = 6, &buf, (void **)&sense_pages, NULL, NULL, &blksize, - sizeof(sense_pages->reduced_geometry), flags | SCSI_SILENT); + sizeof(sense_pages->reduced_geometry), flags | SCSI_SILENT, NULL); if (error == 0) { dp->heads = 64; dp->sectors = 32; |