Ticket #817: smartd-ticket817.patch

File smartd-ticket817.patch, 904 bytes (added by Christian Franke, 7 years ago)

Proposed patch

  • smartd.cpp

     
    34763476    PrintOut(LOG_INFO,"Device: %s, SMART health: passed\n", name);
    34773477
    34783478  // check temperature limits
    3479   if (cfg.tempdiff || cfg.tempinfo || cfg.tempcrit || !cfg.attrlog_file.empty())
     3479  if (cfg.tempdiff || cfg.tempinfo || cfg.tempcrit)
    34803480    CheckTemperature(cfg, state, currenttemp, triptemp);
    34813481
    34823482  // check if number of selftest errors has increased (note: may also DECREASE)
     
    35113511      scsiDecodeNonMediumErrPage(tBuf, &state.scsi_nonmedium_error.nme);
    35123512      state.scsi_nonmedium_error.found=1;
    35133513    }
     3514    // save temperature if not done by CheckTemperature() above
     3515    if (!(cfg.tempdiff || cfg.tempinfo || cfg.tempcrit))
     3516      state.temperature = currenttemp;
    35143517  }
    35153518  CloseDevice(scsidev, name);
    35163519  return 0;