1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 2853

Show
Ignore:
Timestamp:
07/21/09 19:09:49 (4 years ago)
Author:
chrfranke
Message:

smartctl: Fix number of entries in '-l xselftest' output.

Location:
trunk/smartmontools
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/smartmontools/CHANGELOG

    r2851 r2853  
    4242<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> 
    4343 
     44  [CF] smartctl: Fix number of entries in '-l xselftest' output. 
     45 
    4446  [CF] Add USB IDs of a SunplusIT bridge, three WD drives, and an 
    4547       unsupported Iomega drive. 
  • trunk/smartmontools/ataprint.cpp

    • Property svn:keywords set to Id
    r2832 r2853  
    4545#include "knowndrives.h" 
    4646 
    47 const char *ataprint_c_cvsid="$Id: ataprint.cpp,v 1.214 2009/07/07 19:28:29 chrfranke Exp $" 
    48 ATACMDNAMES_H_CVSID ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID; 
     47const char * ataprint_cpp_cvsid = "$Id$" 
     48                                  ATAPRINT_H_CVSID; 
    4949 
    5050// for passing global control variables 
     
    13861386  logidx--; 
    13871387 
    1388   unsigned logcnt = nentries; 
    1389   if (max_entries < logcnt) 
    1390     logcnt = max_entries; 
    1391  
    13921388  bool print_header = true; 
    13931389 
    13941390  // Iterate through circular buffer in reverse direction 
    13951391  for (unsigned i = 0, testnum = 1; 
    1396        i < logcnt; i++, logidx = (logidx > 0 ? logidx - 1 : nentries - 1)) { 
     1392       i < nentries && testnum <= max_entries; 
     1393       i++, logidx = (logidx > 0 ? logidx - 1 : nentries - 1)) { 
    13971394 
    13981395    const ata_smart_extselftestlog_desc & entry = log[logidx / 19].log_descs[logidx % 19];