git: 8b620483bbd6 - stable/13 - scsi_cd: Use a bool for the second parameter of cdcheckmedia()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Feb 2024 15:41:24 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b620483bbd60fbcc1374d195bb9eaf327434135 commit 8b620483bbd60fbcc1374d195bb9eaf327434135 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-01-30 01:00:13 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-02-09 15:38:18 +0000 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) --- sys/cam/scsi/scsi_cd.c | 10 +++++----- 1 file 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;