summaryrefslogtreecommitdiff
path: root/sys/scsi/cd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-08-29 16:07:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-08-29 16:07:20 +0000
commit19f0391214edff4f20640b888d7d010e6c81d781 (patch)
treead0a60f46aac481729ec67f02ef0c097eee98738 /sys/scsi/cd.c
parent01696c66bb8d8e7528dece42ba48e19e22cbb28d (diff)
Use u_int32_t for nsecs, making it crystal clear that the values
are expected to fit into a 4-byte field.
Diffstat (limited to 'sys/scsi/cd.c')
-rw-r--r--sys/scsi/cd.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 34cdd71daef..30178cec612 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.257 2020/08/29 02:03:31 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.258 2020/08/29 16:07:19 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -111,8 +111,8 @@ struct cd_softc {
void cdstart(struct scsi_xfer *);
void cd_buf_done(struct scsi_xfer *);
-int cd_cmd_rw6(struct scsi_generic *, int, u_int64_t, u_int);
-int cd_cmd_rw10(struct scsi_generic *, int, u_int64_t, u_int);
+int cd_cmd_rw6(struct scsi_generic *, int, u_int64_t, u_int32_t);
+int cd_cmd_rw10(struct scsi_generic *, int, u_int64_t, u_int32_t);
void cdminphys(struct buf *);
int cdgetdisklabel(dev_t, struct cd_softc *, struct disklabel *, int);
int cd_setchan(struct cd_softc *, int, int, int, int, int);
@@ -485,7 +485,8 @@ done:
}
int
-cd_cmd_rw6(struct scsi_generic *generic, int read, u_int64_t secno, u_int nsecs)
+cd_cmd_rw6(struct scsi_generic *generic, int read, u_int64_t secno,
+ u_int32_t nsecs)
{
struct scsi_rw *cmd = (struct scsi_rw *)generic;
@@ -497,7 +498,8 @@ cd_cmd_rw6(struct scsi_generic *generic, int read, u_int64_t secno, u_int nsecs)
}
int
-cd_cmd_rw10(struct scsi_generic *generic, int read, u_int64_t secno, u_int nsecs)
+cd_cmd_rw10(struct scsi_generic *generic, int read, u_int64_t secno,
+ u_int32_t nsecs)
{
struct scsi_rw_big *cmd = (struct scsi_rw_big *)generic;
@@ -531,7 +533,8 @@ cdstart(struct scsi_xfer *xs)
struct cd_softc *sc = link->device_softc;
struct buf *bp;
struct partition *p;
- u_int64_t secno, nsecs;
+ u_int64_t secno;
+ u_int32_t nsecs;
int read;
SC_DEBUG(link, SDEV_DB2, ("cdstart\n"));