From 10fc9d90cefd1fdecd6f8b66085eea04482978a6 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sat, 12 Dec 1998 23:52:46 +0000 Subject: [PATCH] Return ENODEV instead of EINVAL when a particular exchange or move operation exceeds the capabilities of the changer device. --- sys/cam/scsi/scsi_ch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index 2d0290e954f..346bdbff6b3 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_ch.c,v 1.6 1998/11/22 23:44:47 ken Exp $ + * $Id: scsi_ch.c,v 1.7 1998/12/04 22:54:43 archie Exp $ */ /* * Derived from the NetBSD SCSI changer driver. @@ -851,7 +851,7 @@ chmove(struct cam_periph *periph, struct changer_move *cm) * Check the request against the changer's capabilities. */ if ((softc->sc_movemask[cm->cm_fromtype] & (1 << cm->cm_totype)) == 0) - return (EINVAL); + return (ENODEV); /* * Calculate the source and destination elements. @@ -909,7 +909,7 @@ chexchange(struct cam_periph *periph, struct changer_exchange *ce) (1 << ce->ce_fdsttype)) == 0) || ((softc->sc_exchangemask[ce->ce_fdsttype] & (1 << ce->ce_sdsttype)) == 0)) - return (EINVAL); + return (ENODEV); /* * Calculate the source and destination elements.