aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2024-01-30 01:00:13 +0000
committerMark Johnston <markj@FreeBSD.org>2024-02-09 15:38:18 +0000
commit8b620483bbd60fbcc1374d195bb9eaf327434135 (patch)
tree41f3d9636434436e24ac84ad2d7e9c718d32e18b
parent134580c103b4b71751972365770333ad523813c9 (diff)
downloadsrc-8b620483bbd60fbcc1374d195bb9eaf327434135.tar.gz
src-8b620483bbd60fbcc1374d195bb9eaf327434135.zip
scsi_cd: Use a bool for the second parameter of cdcheckmedia()
No functional change intended. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43525 (cherry picked from commit b1710124ff14f96db4c2a8fa37fc7c7b433fb176)
-rw-r--r--sys/cam/scsi/scsi_cd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index d5c3dd02df1d..76e413064781 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -264,7 +264,7 @@ static union cd_pages *cdgetpage(struct cd_mode_params *mode_params);
static int cdgetpagesize(int page_num);
static void cdprevent(struct cam_periph *periph, int action);
static void cdmediaprobedone(struct cam_periph *periph);
-static int cdcheckmedia(struct cam_periph *periph, int do_wait);
+static int cdcheckmedia(struct cam_periph *periph, bool do_wait);
#if 0
static int cdsize(struct cam_periph *periph, u_int32_t *size);
#endif
@@ -775,7 +775,7 @@ cdopen(struct disk *dp)
* if we don't have media, but then we don't allow anything but the
* CDIOCEJECT/CDIOCCLOSE ioctls if there is no media.
*/
- cdcheckmedia(periph, /*do_wait*/ 1);
+ cdcheckmedia(periph, /*do_wait*/ true);
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("leaving cdopen\n"));
cam_periph_unhold(periph);
@@ -881,7 +881,7 @@ cdstrategy(struct bio *bp)
* check first. The I/O will get executed after the media check.
*/
if ((softc->flags & CD_FLAG_VALID_MEDIA) == 0)
- cdcheckmedia(periph, /*do_wait*/ 0);
+ cdcheckmedia(periph, /*do_wait*/ false);
else
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
@@ -1782,7 +1782,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td)
&& ((cmd != CDIOCCLOSE)
&& (cmd != CDIOCEJECT))
&& (IOCGROUP(cmd) == 'c')) {
- error = cdcheckmedia(periph, /*do_wait*/ 1);
+ error = cdcheckmedia(periph, /*do_wait*/ true);
if (error != 0) {
cam_periph_unhold(periph);
cam_periph_unlock(periph);
@@ -2683,7 +2683,7 @@ cdmediaprobedone(struct cam_periph *periph)
*/
static int
-cdcheckmedia(struct cam_periph *periph, int do_wait)
+cdcheckmedia(struct cam_periph *periph, bool do_wait)
{
struct cd_softc *softc;
int error;