Ticket #1082: scsi_defect_grown_list.diff

File scsi_defect_grown_list.diff, 854 bytes (added by Rick Chen, 8 months ago)
  • scsiprint.cpp

    diff --git a/scsiprint.cpp b/scsiprint.cpp
    index abde8f5..7e251eb 100644
    a b scsiPrintGrownDefectListLen(scsi_device * device) 
    609609            print_off();
    610610            break;
    611611    }
    612     if (0 == dl_len)
    613         pout("Elements in grown defect list: 0\n\n");
     612    if (0 == dl_len) {
     613        jout("Elements in grown defect list: 0\n\n");
     614        jglb["scsi_grown_defect_list"] = 0;
     615    }
    614616    else {
    615617        if (0 == div)
    616618            pout("Grown defect list length=%u bytes [unknown "
    617619                 "number of elements]\n\n", dl_len);
    618         else
    619             pout("Elements in grown defect list: %u\n\n", dl_len / div);
     620        else {
     621            jout("Elements in grown defect list: %u\n\n", dl_len / div);
     622            jglb["scsi_grown_defect_list"] = dl_len;
     623        }
    620624    }
    621625}
    622626