Date: Fri, 15 Nov 2013 23:10:01 GMT From: Alex Samorukov <samm@os2.kiev.ua> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/181836: Port sysutils/smartmontools brocken for scsi discs Message-ID: <201311152310.rAFNA1EJ092780@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/181836; it has been noted by GNATS. From: Alex Samorukov <samm@os2.kiev.ua> To: bug-followup@FreeBSD.org, Meyser@xenet.de Cc: Subject: Re: ports/181836: Port sysutils/smartmontools brocken for scsi discs Date: Sat, 16 Nov 2013 00:07:25 +0100 This is a multi-part message in MIME format. --------------030907090406080100010904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I was able to catch this bug and [probably] fix it. Could you please try this patch (or latest svn version) and tell me if it works for you? --------------030907090406080100010904 Content-Type: text/x-patch; name="fix_freebsd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix_freebsd.diff" Index: os_freebsd.cpp =================================================================== --- os_freebsd.cpp (revision 3857) +++ os_freebsd.cpp (revision 3858) @@ -445,7 +445,8 @@ } if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - cam_error_print(m_camdev, &ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + if(scsi_debugmode > 0) + cam_error_print(m_camdev, &ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); set_err(EIO); return -1; } @@ -997,13 +998,15 @@ if (cam_send_ccb(m_camdev,ccb) < 0) { warn("error sending SCSI ccb"); - cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); + if (report > 0) + cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); cam_freeccb(ccb); return -EIO; } - if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) { - cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); + if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR)) { + if(report > 0) + cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); cam_freeccb(ccb); return -EIO; } --------------030907090406080100010904--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311152310.rAFNA1EJ092780>