ports/181836: Port sysutils/smartmontools brocken for scsi discs

Alex Samorukov samm at os2.kiev.ua
Fri Nov 15 23:10:03 UTC 2013


The following reply was made to PR ports/181836; it has been noted by GNATS.

From: Alex Samorukov <samm at os2.kiev.ua>
To: bug-followup at FreeBSD.org, Meyser at 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--


More information about the freebsd-ports-bugs mailing list