From 814465c1457288eb46281f117a733c98210b6d9a Mon Sep 17 00:00:00 2001 From: mjacob Date: Thu, 3 Mar 2011 18:28:21 +0000 Subject: 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 --- sys/cam/cam_periph.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys/cam') diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 2474c6e..41185db 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -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 -- cgit v1.1