~ubuntu-branches/ubuntu/natty/smartmontools/natty

« back to all changes in this revision

Viewing changes to atacmds.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Giuseppe Iuculano
  • Date: 2010-07-13 13:16:54 UTC
  • mfrom: (2.2.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100713131654-k5wd1maqujl2uufp
Tags: 5.39.1+svn3124-1
* [1e46e09] Set state and attribute file directory to
  /var/lib/smartmontools/ (Closes: #582158)
* [e20147c] Don't warn about being disabled unless verbose (Closes: #583386)
* [3390c07] Fixed example path in man pages (Closes: #588134)
* [e9583e0] Imported Upstream version 5.39.1+svn3124
* [789e123] Refreshed patches
* [cbecf14] Bump to Standards-Version 3.9.0, no changes needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include "utility.h"
38
38
#include "dev_ata_cmd_set.h" // for parsed_ata_device
39
39
 
40
 
const char * atacmds_cpp_cvsid = "$Id: atacmds.cpp 3065 2010-02-10 22:16:50Z chrfranke $"
 
40
const char * atacmds_cpp_cvsid = "$Id: atacmds.cpp 3117 2010-06-08 15:41:04Z chrfranke $"
41
41
                                 ATACMDS_H_CVSID;
42
42
 
43
43
// for passing global control variables
153
153
                              bool & increase)
154
154
{
155
155
  unsigned char id = (!offline ? 197 : 198);
156
 
  increase = !!(defs[id].flags & ATTRFLAG_INCREASING);
 
156
  const ata_vendor_attr_defs::entry & def = defs[id];
 
157
  if (def.flags & ATTRFLAG_INCREASING)
 
158
    increase = true; // '-v 19[78],increasing' option
 
159
  else if (def.name.empty() || (id == 198 && def.name == "Offline_Scan_UNC_SectCt"))
 
160
    increase = false; // no or '-v 198,offlinescanuncsectorct' option
 
161
  else
 
162
    id = 0; // other '-v 19[78],...' option
157
163
  return id;
158
164
}
159
165
 
223
229
  {"194,10xCelsius"               , "194,temp10x,Temperature_Celsius_x10"},
224
230
  {"194,unknown"                  , "194,raw48,Unknown_Attribute"},
225
231
  {"197,increasing"               , "197,raw48+,Total_Pending_Sectors"}, // '+' sets flag
226
 
  {"198,offlinescanuncsectorct"   , "198,raw48,Offline_Scan_UNC_SectCt"},
 
232
  {"198,offlinescanuncsectorct"   , "198,raw48,Offline_Scan_UNC_SectCt"}, // see also get_unc_attr_id() above
227
233
  {"198,increasing"               , "198,raw48+,Total_Offl_Uncorrectabl"}, // '+' sets flag
228
234
  {"200,writeerrorcount"          , "200,raw48,Write_Error_Count"},
229
235
  {"201,detectedtacount"          , "201,raw48,Detected_TA_Count"},