Don't automatically send a START UNIT to sequential access devices-

this might cause them to load the tape unintentionally.

Reviewed by:	gibbs
MFC after:	1 month
This commit is contained in:
Matt Jacob 2011-03-03 18:28:21 +00:00
parent 815cb72a0c
commit 753e7ed072
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219241

View File

@ -1560,6 +1560,15 @@ camperiphscsisenseerror(union ccb *ccb, cam_flags camflags,
case SS_START:
{
int le;
if (SID_TYPE(&cgd.inq_data) == T_SEQUENTIAL) {
xpt_free_ccb(orig_ccb);
ccb->ccb_h.status |= CAM_DEV_QFRZN;
*action_string = "Will not autostart a "
"sequential access device";
err_action = SS_FAIL;
error = EIO;
break;
}
/*
* Send a start unit command to the device, and