]> git.proxmox.com Git - mirror_smartmontools-debian.git/commitdiff
Imported Upstream version 5.42+svn3539
authorGiuseppe Iuculano <iuculano@debian.org>
Sat, 12 May 2012 10:47:30 +0000 (12:47 +0200)
committerGiuseppe Iuculano <iuculano@debian.org>
Sat, 12 May 2012 10:47:30 +0000 (12:47 +0200)
18 files changed:
CHANGELOG
INSTALL
Makefile.am
NEWS
atacmds.cpp
atacmds.h
ataprint.cpp
ataprint.h
autogen.sh
configure.in
dev_interface.cpp
dev_interface.h
drivedb.h
os_freebsd.cpp
os_win32.cpp
smartctl.8.in
smartctl.cpp
smartd.8.in

index dc727559401bbed4a60556fcffbb4901bacb2c23..23994e4d272b57c6cd90548683b35030e33b5a60 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
 CHANGELOG for smartmontools
 
-$Id: CHANGELOG 3521 2012-03-06 21:15:25Z chrfranke $
+$Id: CHANGELOG 3539 2012-05-01 19:57:02Z chrfranke $
 
 The most recent version of this file is:
 http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/trunk/smartmontools/CHANGELOG?view=markup
@@ -41,6 +41,73 @@ Maintainers / Developers Key (alphabetic order):
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] smartctl: Add log addresses and statistics value from ACS-3 revision 2.
+
+  [CF] drivedb.h updates:
+       - Crucial/Micron RealSSD C300/C400/m4: m4 512GB
+       - Indilinx Everest/Martini based SSDs: OCZ-PETROL
+       - SAMSUNG SpinPoint F4 EG (AFT): Fix link
+       - Seagate Momentus 4200.2: ST960812A
+       - Seagate Momentus 5400.2: ST960821A (from 4200.2)
+       - Seagate Barracuda 7200.12: ST3500413AS
+       - Western Digital RE3 Serial ATA: WD7502ABYS
+       - Western Digital AV-GP: WD....AV[CD]S, split entry
+       - Western Digital AV-GP (Adv. Format): WD10EU[CR]X
+
+  [CF] autogen.sh: Set svn:eol-style=LF to be compatible with Cygwin bash.
+
+  [CF] autogen.sh: automake 1.11.3 is OK.
+
+  [CF] drivedb.h updates:
+       - Sandforce Driven SSDs: Smart Storage Systems XceedSTOR,
+         XceedIOPS2, Xcel-200
+       - Smart Storage Systems XceedSecure2 SSDs
+       - Smart Storage Systems XceedUltraX/Adtron A25FBX SSDs
+       - Smart Storage Systems Adtron A25FB 2xN SSDs
+       - Smart Storage Systems Adtron A25FB 3xN SSDs
+       Original patch was provided by Rusty Carruth
+
+  [CF] drivedb.h updates:
+       - Remove outdated IBM links
+       - Update all links to Seagate Knowledge Base
+       - Hitachi Deskstar 7K1000.D
+
+  [CF] drivedb.h USB update:
+       - Seagate Expansion External (0x0bc2:0x3332) (ticket #223)
+
+  [CF] drivedb.h USB updates:
+       - Samsung Story Station (0x04e8:0x5f05)
+       - Toshiba STOR.E (0x0930:0x0b1b)
+
+  [CF] smartctl: Add options '-f hex' and '-f hex,[id|val]' to print
+       attribute IDs and/or values as hex.
+
+  [CF] smartd.8.in: Fix signal name (Debian bug 661801).
+
+  [CF] Add 'raw56', 'hex56', 'raw24(raw8)' attribute print formats.
+       Change default for Power_On_Hours to 'raw24(raw8)'.
+       This provides more reasonable output for SandForce based devices
+       missing in drivedb.h.
+
+  [CF] configure.in, Makefile.am: Support new SVN 1.7 working copy format.
+
+  [CF] drivedb.h update:
+       - Intel 520 Series SSDs: Add units to attributes 241, 242, 249.
+
+  [AS] drivedb.h: fixed identifier for Seagate SV35 series.
+
+  [CF] Print command duration in ATA debug output.
+       Add smart_interface::get_timer_usec().
+
+  [CF] drivedb.h updates:
+       - SandForce Driven SSDs: G.SKILL Phoenix Pro
+       - Intel 520 Series SSDs
+       - SAMSUNG SpinPoint F4 EG: Update firmware download link
+
+  [CF] drivedb.h updates:
+       - Add comment with default settings.
+       - Samsung based SSDs: Fix attribute 240
+
   [CF] Windows: Add Win8 to get_os_version_str().
 
   [CF] Windows: Remove MSVC specific pragma, disable warning in project file.
diff --git a/INSTALL b/INSTALL
index afbb47a20ae094e96c27d4e9b54890282f37fafb..36fcb952e1263437537d4f37d14161d06af5426f 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
 Smartmontools installation instructions
 =======================================
 
-$Id: INSTALL 3414 2011-09-09 21:07:55Z chrfranke $
+$Id: INSTALL 3537 2012-04-28 13:22:41Z chrfranke $
 
 Please also see the smartmontools home page:
 http://smartmontools.sourceforge.net/
@@ -419,14 +419,9 @@ Same as Red Hat:
   file type ("binmode" mount option) set. The "autogen.sh" script prints a
   warning if DOS type is selected.
 
-  If installing from SVN, you may check out all files either with CR/LF
-  or LF line endings. Starting with release 3.1-7, Cygwin's bash does no
-  longer accept scripts with CR/LF by default. To run the initial script
-  ./autogen.sh checked out with CR/LF on a "binmode" mount, type:
-
-  bash -o igncr ./autogen.sh
-
-  instead. This is not necessary for the generated ./configure script.
+  Files may also be checked out with a non-Cygwin SVN client which uses CR/LF
+  for svn:eol-style=native.  The "autogen.sh" script has svn:eol-style=LF.
+  Bash option "-o igncr" is not required.
 
 [10] Guidelines for Windows
 ===========================
index 969cadce61a8fb043e9f31d4c25955a507f1d009..cd3d8a51e06ab0da622230c2cfc9bdc536986b04 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 #
-# $Id: Makefile.am 3474 2011-11-10 18:19:58Z chrfranke $
+# $Id: Makefile.am 3527 2012-03-25 16:42:24Z chrfranke $
 #
 
 @SET_MAKE@
@@ -386,7 +386,7 @@ utility.o: svnversion.h
 
 if IS_SVN_BUILD
 # Get version info from SVN
-svnversion.h: CHANGELOG Makefile $(srcdir)/.svn/entries
+svnversion.h: CHANGELOG Makefile $(svn_deps)
        echo '/* svnversion.h.  Generated by Makefile from svn info.  */' > $@
        (cd $(srcdir) \
         && svnversion 2>/dev/null | sed -n 's,^\([0-9].*\),REV  "\1",p' \
@@ -818,7 +818,7 @@ config-vc10: $(srcdir)/os_win32/config_vc10.h  $(srcdir)/os_win32/svnversion_vc1
 
 $(srcdir)/os_win32/config_vc10.h: config.h Makefile
        sed -e '1i/* config_vc10.h.  Generated from config.h by Makefile.  */' \
-           -e 's,^#define HAVE_\(ATTR_PACKED\|INTTYPES_H\|[DK_]*NTDDDISK_H\|STRINGS_H\|STRTOULL\|UNISTD_H\|WORKING_SNPRINTF\) 1$$,/* #undef HAVE_\1 */,' \
+           -e 's,^#define HAVE_\(ATTR_PACKED\|GETTIMEOFDAY\|INTTYPES_H\|[DK_]*NTDDDISK_H\|STRINGS_H\|STRTOULL\|UNISTD_H\|WORKING_SNPRINTF\) 1$$,/* #undef HAVE_\1 */,' \
            -e 's,^\(#define SMARTMONTOOLS_BUILD_HOST "[^-]*\)[^"]*,\1-pc-w32vc10,' $< > $@
 
 $(srcdir)/os_win32/svnversion_vc10.h: svnversion.h
diff --git a/NEWS b/NEWS
index fdc0545e1667343aaa11011c4ebe16813ac301bb..07cbf41300aa7f130ef781a6332420281f7a90ed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
 smartmontools NEWS
 ------------------
-$Id: NEWS 3513 2012-02-15 21:57:21Z chrfranke $
+$Id: NEWS 3530 2012-03-27 19:54:06Z chrfranke $
 
 The most up-to-date version of this file is:
 http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/trunk/smartmontools/NEWS?view=markup
@@ -13,6 +13,7 @@ Summary: smartmontools release 5.43
   cache, Security (freeze), Standby mode/timer.
 - smartd directive '-e' to set (most of) the above settings
   on startup.
+- smartctl options '-f hex' and '-f hex,[id|val]'.
 - smartctl does not start ATA self-test if another test is
   already running.  Override with new option '-t force'.
 - smartctl supports extended self-test polling times
index 507f304c9260211f34a6ec9d7e4205ab4d1cc7ae..f9ab53bac33967f45767ba3e954236b6e3f01812 100644 (file)
@@ -36,7 +36,7 @@
 #include "utility.h"
 #include "dev_ata_cmd_set.h" // for parsed_ata_device
 
-const char * atacmds_cpp_cvsid = "$Id: atacmds.cpp 3507 2012-02-11 20:16:13Z chrfranke $"
+const char * atacmds_cpp_cvsid = "$Id: atacmds.cpp 3528 2012-03-25 17:13:47Z chrfranke $"
                                  ATACMDS_H_CVSID;
 
 // Print ATA debug messages?
@@ -212,10 +212,13 @@ const format_name_entry format_names[] = {
   {"raw16"          , RAWFMT_RAW16},
   {"raw48"          , RAWFMT_RAW48},
   {"hex48"          , RAWFMT_HEX48},
+  {"raw56"          , RAWFMT_RAW56},
+  {"hex56"          , RAWFMT_HEX56},
   {"raw64"          , RAWFMT_RAW64},
   {"hex64"          , RAWFMT_HEX64},
   {"raw16(raw16)"   , RAWFMT_RAW16_OPT_RAW16},
   {"raw16(avg16)"   , RAWFMT_RAW16_OPT_AVG16},
+  {"raw24(raw8)"    , RAWFMT_RAW24_OPT_RAW8},
   {"raw24/raw24"    , RAWFMT_RAW24_DIV_RAW24},
   {"raw24/raw32"    , RAWFMT_RAW24_DIV_RAW32},
   {"sec2hour"       , RAWFMT_SEC2HOUR},
@@ -611,8 +614,19 @@ int smartcommandhandler(ata_device * device, smart_command_set command, int sele
          in.direction==ata_cmd_in::data_out ? " OUT\n":"\n"));
 
     ata_cmd_out out;
+
+    int64_t start_usec = -1;
+    if (ata_debugmode)
+      start_usec = smi()->get_timer_usec();
+
     bool ok = device->ata_pass_through(in, out);
 
+    if (start_usec >= 0) {
+      int64_t duration_usec = smi()->get_timer_usec() - start_usec;
+      if (duration_usec >= 500)
+        pout(" [Duration: %.3fs]\n", duration_usec / 1000000.0);
+    }
+
     if (ata_debugmode && out.out_regs.is_set())
       print_regs(" Output: ", out.out_regs);
 
@@ -1948,6 +1962,9 @@ static ata_attr_raw_format get_default_raw_format(unsigned char id)
   case 196: // Reallocated event count
     return RAWFMT_RAW16_OPT_RAW16;
 
+  case 9:  // Power on hours
+    return RAWFMT_RAW24_OPT_RAW8;
+
   case 190: // Temperature
   case 194:
     return RAWFMT_TEMPMINMAX;
@@ -1970,6 +1987,8 @@ uint64_t ata_get_attr_raw_value(const ata_smart_attribute & attr,
       case RAWFMT_RAW64:
       case RAWFMT_HEX64:
         byteorder = "543210wv"; break;
+      case RAWFMT_RAW56:
+      case RAWFMT_HEX56:
       case RAWFMT_RAW24_DIV_RAW32:
       case RAWFMT_MSEC24_HOUR32:
         byteorder = "r543210"; break;
@@ -2039,6 +2058,7 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attr,
     break;
 
   case RAWFMT_RAW48:
+  case RAWFMT_RAW56:
   case RAWFMT_RAW64:
     s = strprintf("%"PRIu64, rawvalue);
     break;
@@ -2047,6 +2067,10 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attr,
     s = strprintf("0x%012"PRIx64, rawvalue);
     break;
 
+  case RAWFMT_HEX56:
+    s = strprintf("0x%014"PRIx64, rawvalue);
+    break;
+
   case RAWFMT_HEX64:
     s = strprintf("0x%016"PRIx64, rawvalue);
     break;
@@ -2054,7 +2078,7 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attr,
   case RAWFMT_RAW16_OPT_RAW16:
     s = strprintf("%u", word[0]);
     if (word[1] || word[2])
-      s += strprintf(" (%u, %u)", word[2], word[1]);
+      s += strprintf(" (%u %u)", word[2], word[1]);
     break;
 
   case RAWFMT_RAW16_OPT_AVG16:
@@ -2063,6 +2087,12 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attr,
       s += strprintf(" (Average %u)", word[1]);
     break;
 
+  case RAWFMT_RAW24_OPT_RAW8:
+    s = strprintf("%u", (unsigned)(rawvalue & 0x00ffffffULL));
+    if (raw[3] || raw[4] || raw[5])
+      s += strprintf(" (%d %d %d)", raw[5], raw[4], raw[3]);
+    break;
+
   case RAWFMT_RAW24_DIV_RAW24:
     s = strprintf("%u/%u",
       (unsigned)(rawvalue >> 24), (unsigned)(rawvalue & 0x00ffffffULL));
index 9a65b734135efbde54d85fde4bc2f433835f935e..9a715656968b44e8b6544d6ce850c7701f50c40e 100644 (file)
--- a/atacmds.h
+++ b/atacmds.h
@@ -26,7 +26,7 @@
 #ifndef ATACMDS_H_
 #define ATACMDS_H_
 
-#define ATACMDS_H_CVSID "$Id: atacmds.h 3508 2012-02-12 15:47:56Z chrfranke $"
+#define ATACMDS_H_CVSID "$Id: atacmds.h 3528 2012-03-25 17:13:47Z chrfranke $"
 
 #include "dev_interface.h" // ata_device
 
@@ -673,10 +673,13 @@ enum ata_attr_raw_format
   RAWFMT_RAW16,
   RAWFMT_RAW48,
   RAWFMT_HEX48,
+  RAWFMT_RAW56,
+  RAWFMT_HEX56,
   RAWFMT_RAW64,
   RAWFMT_HEX64,
   RAWFMT_RAW16_OPT_RAW16,
   RAWFMT_RAW16_OPT_AVG16,
+  RAWFMT_RAW24_OPT_RAW8,
   RAWFMT_RAW24_DIV_RAW24,
   RAWFMT_RAW24_DIV_RAW32,
   RAWFMT_SEC2HOUR,
index 19ec8d44cff808445c1e4fa956a4c7d705a097ac..0007d34134f2e0fbc97da7f9e8bb3b030b42d855 100644 (file)
@@ -40,7 +40,7 @@
 #include "utility.h"
 #include "knowndrives.h"
 
-const char * ataprint_cpp_cvsid = "$Id: ataprint.cpp 3509 2012-02-12 17:10:35Z chrfranke $"
+const char * ataprint_cpp_cvsid = "$Id: ataprint.cpp 3539 2012-05-01 19:57:02Z chrfranke $"
                                   ATAPRINT_H_CVSID;
 
 
@@ -801,6 +801,9 @@ static void PrintSmartAttribWithThres(const ata_smart_values * data,
                                       const ata_vendor_attr_defs & defs,
                                       int onlyfailed, unsigned char format)
 {
+  bool brief  = !!(format & ata_print_options::FMT_BRIEF);
+  bool hexid  = !!(format & ata_print_options::FMT_HEX_ID);
+  bool hexval = !!(format & ata_print_options::FMT_HEX_VAL);
   bool needheader = true;
 
   // step through all vendor attributes
@@ -826,35 +829,42 @@ static void PrintSmartAttribWithThres(const ata_smart_values * data,
         pout("SMART Attributes Data Structure revision number: %d\n",(int)data->revnumber);
         pout("Vendor Specific SMART Attributes with Thresholds:\n");
       }
-      if (format == 0)
-        pout("ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE\n");
+      if (!brief)
+        pout("ID#%s ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE\n",
+             (!hexid ? "" : " "));
       else
-        pout("ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE\n");
+        pout("ID#%s ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE\n",
+             (!hexid ? "" : " "));
       needheader = false;
     }
 
     // Format value, worst, threshold
     std::string valstr, worstr, threstr;
     if (state > ATTRSTATE_NO_NORMVAL)
-      valstr = strprintf("%.3d", attr.current);
+      valstr = (!hexval ? strprintf("%.3d",   attr.current)
+                        : strprintf("0x%02x", attr.current));
     else
-      valstr = "---";
+      valstr = (!hexval ? "---" : "----");
     if (!(defs[attr.id].flags & ATTRFLAG_NO_WORSTVAL))
-      worstr = strprintf("%.3d", attr.worst);
+      worstr = (!hexval ? strprintf("%.3d",   attr.worst)
+                        : strprintf("0x%02x", attr.worst));
     else
-      worstr = "---";
+      worstr = (!hexval ? "---" : "----");
     if (state > ATTRSTATE_NO_THRESHOLD)
-      threstr = strprintf("%.3d", threshold);
+      threstr = (!hexval ? strprintf("%.3d",   threshold)
+                         : strprintf("0x%02x", threshold));
     else
-      threstr = "---";
+      threstr = (!hexval ? "---" : "----");
 
     // Print line for each valid attribute
+    std::string idstr = (!hexid ? strprintf("%3d",    attr.id)
+                                : strprintf("0x%02x", attr.id));
     std::string attrname = ata_get_smart_attr_name(attr.id, defs);
     std::string rawstr = ata_format_attr_raw_value(attr, defs);
 
-    if (format == 0)
-      pout("%3d %-24s0x%04x   %-3s   %-3s   %-3s    %-10s%-9s%-12s%s\n",
-           attr.id, attrname.c_str(), attr.flags,
+    if (!brief)
+      pout("%s %-24s0x%04x   %-4s  %-4s  %-4s   %-10s%-9s%-12s%s\n",
+           idstr.c_str(), attrname.c_str(), attr.flags,
            valstr.c_str(), worstr.c_str(), threstr.c_str(),
            (ATTRIBUTE_FLAGS_PREFAILURE(attr.flags) ? "Pre-fail" : "Old_age"),
            (ATTRIBUTE_FLAGS_ONLINE(attr.flags)     ? "Always"   : "Offline"),
@@ -863,8 +873,8 @@ static void PrintSmartAttribWithThres(const ata_smart_values * data,
                                            : "    -"        ) ,
             rawstr.c_str());
     else
-      pout("%3d %-24s%c%c%c%c%c%c%c  %-3s   %-3s   %-3s    %-5s%s\n",
-           attr.id, attrname.c_str(),
+      pout("%s %-24s%c%c%c%c%c%c%c  %-4s  %-4s  %-4s   %-5s%s\n",
+           idstr.c_str(), attrname.c_str(),
            (ATTRIBUTE_FLAGS_PREFAILURE(attr.flags)     ? 'P' : '-'),
            (ATTRIBUTE_FLAGS_ONLINE(attr.flags)         ? 'O' : '-'),
            (ATTRIBUTE_FLAGS_PERFORMANCE(attr.flags)    ? 'S' : '-'),
@@ -881,14 +891,16 @@ static void PrintSmartAttribWithThres(const ata_smart_values * data,
   }
 
   if (!needheader) {
-    if (!onlyfailed && format == 1)
-      pout("%28s||||||_ K auto-keep\n"
-           "%28s|||||__ C event count\n"
-           "%28s||||___ R error rate\n"
-           "%28s|||____ S speed/performance\n"
-           "%28s||_____ O updated online\n"
-           "%28s|______ P prefailure warning\n",
-           "", "", "", "", "", "");
+    if (!onlyfailed && brief) {
+        int n = (!hexid ? 28 : 29);
+        pout("%*s||||||_ K auto-keep\n"
+             "%*s|||||__ C event count\n"
+             "%*s||||___ R error rate\n"
+             "%*s|||____ S speed/performance\n"
+             "%*s||_____ O updated online\n"
+             "%*s|______ P prefailure warning\n",
+             n, "", n, "", n, "", n, "", n, "", n, "");
+    }
     pout("\n");
   }
 }
@@ -959,7 +971,7 @@ static unsigned GetNumLogSectors(const ata_smart_log_directory * logdir, unsigne
 }
 
 // Get name of log.
-// Table A.2 of T13/2161-D Revision 1 (ACS-3), August 13, 2011.
+// Table A.2 of T13/2161-D Revision 2 (ACS-3), February 21, 2012.
 static const char * GetLogName(unsigned logaddr)
 {
     switch (logaddr) {
@@ -976,11 +988,18 @@ static const char * GetLogName(unsigned logaddr)
       case 0x0d: return "LPS Mis-alignment log"; // ACS-2
       case 0x10: return "NCQ Command Error log";
       case 0x11: return "SATA Phy Event Counters";
+      case 0x12: return "SATA NCQ Queue Management log"; // ACS-3
+      case 0x13: return "SATA NCQ Send and Receive log"; // ACS-3
+      case 0x14:
+      case 0x15:
+      case 0x16: return "Reserved for Serial ATA";
       case 0x19: return "LBA Status log"; // ACS-3
       case 0x20: return "Streaming performance log"; // Obsolete
       case 0x21: return "Write stream error log";
       case 0x22: return "Read stream error log";
       case 0x23: return "Delayed sector log"; // Obsolete
+      case 0x24: return "Current Device Internal Status Data log"; // ACS-3
+      case 0x25: return "Saved Device Internal Status Data log"; // ACS-3
       case 0x30: return "IDENTIFY DEVICE data log"; // ACS-3
       case 0xe0: return "SCT Command/Status";
       case 0xe1: return "SCT Data Transfer";
@@ -989,8 +1008,6 @@ static const char * GetLogName(unsigned logaddr)
           return "Device vendor specific log";
         if (0x80 <= logaddr && logaddr <= 0x9f)
           return "Host vendor specific log";
-        if (0x12 <= logaddr && logaddr <= 0x17)
-          return "Reserved for Serial ATA";
         return "Reserved";
     }
     /*NOTREACHED*/
@@ -1063,7 +1080,7 @@ static void PrintLogPages(const char * type, const unsigned char * data,
 
 // See Section A.5 of
 //   ATA/ATAPI Command Set - 3 (ACS-3)
-//   T13/2161-D Revision 1, August 13, 2011
+//   T13/2161-D Revision 2, February 21, 2012.
 
 struct devstat_entry_info
 {
@@ -1084,11 +1101,12 @@ const devstat_entry_info devstat_info_0x01[] = {
   {  6, "Number of Write Commands" },
   {  6, "Logical Sectors Read" },
   {  6, "Number of Read Commands" },
+  {  6, "Date and Time TimeStamp" }, // ACS-3
   {  0, 0 }
 };
 
 const devstat_entry_info devstat_info_0x02[] = {
-  {  2, "Freefall Statistics" },
+  {  2, "Free-Fall Statistics" },
   {  4, "Number of Free-Fall Events Detected" },
   {  4, "Overlimit Shock Events" },
   {  0, 0 }
index 7a7a9bcbbab4b6afa51069f69cb0d079a06e7698..93fdb72cfa0faf7b12c421dd16fa1acfb3dc63bf 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef ATAPRINT_H_
 #define ATAPRINT_H_
 
-#define ATAPRINT_H_CVSID "$Id: ataprint.h 3508 2012-02-12 15:47:56Z chrfranke $\n"
+#define ATAPRINT_H_CVSID "$Id: ataprint.h 3530 2012-03-27 19:54:06Z chrfranke $\n"
 
 #include <vector>
 
@@ -81,7 +81,9 @@ struct ata_print_options
   unsigned sct_temp_int;
   bool sct_temp_int_pers;
 
-  unsigned char output_format; // 0=old, 1=brief
+  enum { FMT_BRIEF = 0x01, FMT_HEX_ID = 0x02, FMT_HEX_VAL = 0x04 };
+  unsigned char output_format; // FMT_* flags
+
   unsigned char fix_firmwarebug; // FIX_*, see atacmds.h
   bool fix_swapped_id; // Fix swapped ID strings returned by some buggy drivers
 
index 5d15b717bd42c516d82687a07702c258c314e53e..82da0ff990498b41c2f7de9926dfd57251f52f39 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: autogen.sh 3462 2011-10-27 19:55:10Z chrfranke $
+# $Id: autogen.sh 3537 2012-04-28 13:22:41Z chrfranke $
 #
 # Generate ./configure from config.in and Makefile.in from Makefile.am.
 # This also adds files like missing,depcomp,install-sh to the source
@@ -83,7 +83,7 @@ case "$ver" in
     rm -f casetest.tmp
     ;;
 
-  1.9.[1-6]|1.10|1.10.[12]|1.11|1.11.1)
+  1.9.[1-6]|1.10|1.10.[12]|1.11|1.11.[1-3])
     # OK
     ;;
 
index aa5b17547fb5ca00f065be1e86b5be4081c6c95a..5c3d352f1b82d37598618a8e3f9a972bf55d655b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: configure.in 3462 2011-10-27 19:55:10Z chrfranke $
+# $Id: configure.in 3527 2012-03-25 16:42:24Z chrfranke $
 #
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.50)
@@ -7,7 +7,7 @@ AC_INIT(smartmontools, 5.43, smartmontools-support@lists.sourceforge.net)
 AC_CONFIG_SRCDIR(smartctl.cpp)
 
 smartmontools_configure_date=`date -u +'%Y-%m-%d %T %Z'`
-smartmontools_cvs_tag=`echo '$Id: configure.in 3462 2011-10-27 19:55:10Z chrfranke $'`
+smartmontools_cvs_tag=`echo '$Id: configure.in 3527 2012-03-25 16:42:24Z chrfranke $'`
 smartmontools_release_date=2011-10-20
 smartmontools_release_time="19:19:34 UTC"
 
@@ -66,12 +66,17 @@ esac
 # Check for SVN.
 AC_MSG_CHECKING([whether this is a build from SVN])
 is_svn_build=no
+svn_deps=
 if test -f "$srcdir/.svn/entries"; then
   is_svn_build=unknown
   if (cd "$srcdir" && svn --version && svnversion && svn info) >/dev/null 2>&1; then
     is_svn_build=yes
+    svn_deps='${srcdir}/.svn/entries'
+    # SVN 1.7 working copy?
+    test -f "$srcdir/.svn/wc.db" && svn_deps='${srcdir}/.svn/wc.db'
   fi
 fi
+AC_SUBST([svn_deps])
 AM_CONDITIONAL(IS_SVN_BUILD, [test "$is_svn_build" = "yes"])
 AC_MSG_RESULT([$is_svn_build])
 
@@ -83,6 +88,10 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
 AC_SEARCH_LIBS(getaddrinfo, nsl)
 AC_SEARCH_LIBS(getdomainname, nsl)
 
+# Note: On Linux, clock_gettime() requires -lrt which implies -lpthreads
+# Check ommitted for now, gettimeofday() provides reasonable precision
+# AC_SEARCH_LIBS(clock_gettime, rt)
+
 dnl Checks for header files.
 AC_CHECK_HEADERS([locale.h])
 AC_CHECK_HEADERS([dev/ata/atavar.h])
@@ -132,6 +141,7 @@ AC_CHECK_FUNCS([gethostbyname])
 AC_CHECK_FUNCS([sigset])
 AC_CHECK_FUNCS([strtoull])
 AC_CHECK_FUNCS([uname])
+AC_CHECK_FUNCS([clock_gettime ftime gettimeofday])
 
 # Check byte ordering (defines WORDS_BIGENDIAN)
 AC_C_BIGENDIAN
index da2ccb779d868f8e38f805a97744b31a1388a8e8..b63f34cdc57c11e78c9750789620514c1be9955b 100644 (file)
 #include <stdarg.h>
 #include <stdexcept>
 
-const char * dev_interface_cpp_cvsid = "$Id: dev_interface.cpp 3519 2012-03-06 20:01:44Z chrfranke $"
+#if defined(HAVE_GETTIMEOFDAY)
+#include <sys/time.h>
+#elif defined(HAVE_FTIME)
+#include <sys/timeb.h>
+#endif
+
+const char * dev_interface_cpp_cvsid = "$Id: dev_interface.cpp 3524 2012-03-21 22:19:31Z chrfranke $"
   DEV_INTERFACE_H_CVSID;
 
 /////////////////////////////////////////////////////////////////////////////
@@ -243,6 +249,36 @@ std::string smart_interface::get_app_examples(const char * /*appname*/)
   return "";
 }
 
+int64_t smart_interface::get_timer_usec()
+{
+#if defined(HAVE_GETTIMEOFDAY)
+ #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+  {
+    static bool have_clock_monotonic = true;
+    if (have_clock_monotonic) {
+      struct timespec ts;
+      if (!clock_gettime(CLOCK_MONOTONIC, &ts))
+        return ts.tv_sec * 1000000LL + ts.tv_nsec/1000;
+      have_clock_monotonic = false;
+    }
+  }
+ #endif
+  {
+    struct timeval tv;
+    gettimeofday(&tv, 0);
+    return tv.tv_sec * 1000000LL + tv.tv_usec;
+  }
+#elif defined(HAVE_FTIME)
+  {
+    struct timeb tb;
+    ftime(&tb);
+    return tb.time * 1000000LL + tb.millitm * 1000;
+  }
+#else
+  return -1;
+#endif
+}
+
 bool smart_interface::disable_system_auto_standby(bool /*disable*/)
 {
   return set_err(ENOSYS);
index dae7fc5551e0be966c20301ec7c03b7cf2e30868..d887b608f01b6b551bc999c859a34a40c8714bc6 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef DEV_INTERFACE_H
 #define DEV_INTERFACE_H
 
-#define DEV_INTERFACE_H_CVSID "$Id: dev_interface.h 3520 2012-03-06 20:50:10Z chrfranke $\n"
+#define DEV_INTERFACE_H_CVSID "$Id: dev_interface.h 3524 2012-03-21 22:19:31Z chrfranke $\n"
 
 #include "utility.h"
 
@@ -730,6 +730,12 @@ public:
   /// TODO: Remove this hack.
   virtual std::string get_app_examples(const char * appname);
 
+  /// Get microseconds since some unspecified starting point.
+  /// Used only for command duration measurements in debug outputs.
+  /// Returns -1 if unsupported.
+  /// Default implementation uses clock_gettime(), gettimeofday() or ftime().
+  virtual int64_t get_timer_usec();
+
   /// Disable/Enable system auto standby/sleep mode.
   /// Return false if unsupported or if system is running
   /// on battery.
index 40a20ec49fb70565578c5e4bb428ce51ed1bfc2a..819dea6e446cf34dfad1aa9ed6a899b8e2b9227f 100644 (file)
--- a/drivedb.h
+++ b/drivedb.h
 /*
 const drive_settings builtin_knowndrives[] = {
  */
-  { "$Id: drivedb.h 3515 2012-02-27 21:05:25Z chrfranke $",
+  { "$Id: drivedb.h 3538 2012-05-01 19:45:49Z chrfranke $",
     "-", "-",
     "This is a dummy entry to hold the SVN-Id of drivedb.h",
     ""
+  /* Default settings:
+    "-v 1,raw48,Raw_Read_Error_Rate "
+    "-v 2,raw48,Throughput_Performance "
+    "-v 3,raw16(avg16),Spin_Up_Time "
+    "-v 4,raw48,Start_Stop_Count "
+    "-v 5,raw16(raw16),Reallocated_Sector_Ct "
+    "-v 6,raw48,Read_Channel_Margin "
+    "-v 7,raw48,Seek_Error_Rate "
+    "-v 8,raw48,Seek_Time_Performance "
+    "-v 9,raw24(raw8),Power_On_Hours " // smartmontools <= r3527: raw48
+    "-v 10,raw48,Spin_Retry_Count "
+    "-v 11,raw48,Calibration_Retry_Count "
+    "-v 12,raw48,Power_Cycle_Count "
+    "-v 13,raw48,Read_Soft_Error_Rate "
+    //  14-174 Unknown_Attribute
+    "-v 175,raw48,Program_Fail_Count_Chip "
+    "-v 176,raw48,Erase_Fail_Count_Chip "
+    "-v 177,raw48,Wear_Leveling_Count "
+    "-v 178,raw48,Used_Rsvd_Blk_Cnt_Chip "
+    "-v 179,raw48,Used_Rsvd_Blk_Cnt_Tot "
+    "-v 180,raw48,Unused_Rsvd_Blk_Cnt_Tot "
+    "-v 181,raw48,Program_Fail_Cnt_Total "
+    "-v 182,raw48,Erase_Fail_Count_Total "
+    "-v 183,raw48,Runtime_Bad_Block "
+    "-v 184,raw48,End-to-End_Error "
+    //  185-186 Unknown_Attribute
+    "-v 187,raw48,Reported_Uncorrect "
+    "-v 188,raw48,Command_Timeout "
+    "-v 189,raw48,High_Fly_Writes "
+    "-v 190,tempminmax,Airflow_Temperature_Cel "
+    "-v 191,raw48,G-Sense_Error_Rate "
+    "-v 192,raw48,Power-Off_Retract_Count "
+    "-v 193,raw48,Load_Cycle_Count "
+    "-v 194,tempminmax,Temperature_Celsius "
+    "-v 195,raw48,Hardware_ECC_Recovered "
+    "-v 196,raw16(raw16),Reallocated_Event_Count "
+    "-v 197,raw48,Current_Pending_Sector "
+    "-v 198,raw48,Offline_Uncorrectable "
+    "-v 199,raw48,UDMA_CRC_Error_Count "
+    "-v 200,raw48,Multi_Zone_Error_Rate "
+    "-v 201,raw48,Soft_Read_Error_Rate "
+    "-v 202,raw48,Data_Address_Mark_Errs "
+    "-v 203,raw48,Run_Out_Cancel "
+    "-v 204,raw48,Soft_ECC_Correction "
+    "-v 205,raw48,Thermal_Asperity_Rate "
+    "-v 206,raw48,Flying_Height "
+    "-v 207,raw48,Spin_High_Current "
+    "-v 208,raw48,Spin_Buzz "
+    "-v 209,raw48,Offline_Seek_Performnce "
+    //  210-219 Unknown_Attribute
+    "-v 220,raw48,Disk_Shift "
+    "-v 221,raw48,G-Sense_Error_Rate "
+    "-v 222,raw48,Loaded_Hours "
+    "-v 223,raw48,Load_Retry_Count "
+    "-v 224,raw48,Load_Friction "
+    "-v 225,raw48,Load_Cycle_Count "
+    "-v 226,raw48,Load-in_Time "
+    "-v 227,raw48,Torq-amp_Count "
+    "-v 228,raw48,Power-off_Retract_Count "
+    //  229 Unknown_Attribute
+    "-v 230,raw48,Head_Amplitude "
+    "-v 231,raw48,Temperature_Celsius "
+    "-v 232,raw48,Available_Reservd_Space "
+    "-v 233,raw48,Media_Wearout_Indicator "
+    //  234-239 Unknown_Attribute
+    "-v 240,raw48,Head_Flying_Hours "
+    "-v 241,raw48,Total_LBAs_Written "
+    "-v 242,raw48,Total_LBAs_Read "
+    //  243-249 Unknown_Attribute
+    "-v 250,raw48,Read_Error_Retry_Rate "
+    //  251-253 Unknown_Attribute
+    "-v 254,raw48,Free_Fall_Sensor "
+  */
   },
   { "Apple SSD SM128", // Samsung?
     "APPLE SSD SM128",
@@ -88,14 +161,14 @@ const drive_settings builtin_knowndrives[] = {
     "ASUS-PHISON SSD",
     "", "", ""
   },
-  { "Crucial/Micron RealSSD C300/C400",
+  { "Crucial/Micron RealSSD C300/C400/m4",
     "C300-CTFDDA[AC](064|128|256)MAG|" // Marvell 88SS9174 BJP2, tested with C300-CTFDDAC128MAG/0002
-    "C400-MTFDDA[ACK](064|128|256|512)MAM|" // tested with C400-MTFDDAC256MAM/0002
-    "M4-CT(064|128|256)M4SSD2", // tested with M4-CT064M4SSD2/0002
+    "C400-MTFDDA[ACK](064|128|256|512)MAM|" // Marvel 9176, tested with C400-MTFDDAC256MAM/0002
+    "M4-CT(064|128|256|512)M4SSD2", // tested with M4-CT064M4SSD2/0002, M4-CT512M4SSD2/0309
     "", "",
   //"-v 1,raw48,Raw_Read_Error_Rate "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 170,raw48,Grown_Failing_Block_Ct "
     "-v 171,raw48,Program_Fail_Count "
@@ -105,7 +178,15 @@ const drive_settings builtin_knowndrives[] = {
     "-v 181,raw16,Non4k_Aligned_Access "
     "-v 183,raw48,SATA_Iface_Downshift "
   //"-v 184,raw48,End-to-End_Error "
+  //"-v 187,raw48,Reported_Uncorrect "
+  //"-v 188,raw48,Command_Timeout "
     "-v 189,raw48,Factory_Bad_Block_Ct "
+  //"-v 194,tempminmax,Temperature_Celsius "
+  //"-v 195,raw48,Hardware_ECC_Recovered "
+  //"-v 196,raw16(raw16),Reallocated_Event_Count "
+  //"-v 197,raw48,Current_Pending_Sector "
+  //"-v 198,raw48,Offline_Uncorrectable "
+  //"-v 199,raw48,UDMA_CRC_Error_Count "
     "-v 202,raw48,Perc_Rated_Life_Used "
     "-v 206,raw48,Write_Error_Rate"
   },
@@ -116,13 +197,15 @@ const drive_settings builtin_knowndrives[] = {
     "Corsair CSSD-F(40|60|80|120|160|240)GBP?2.*|" // Corsair Force, tested with
       // Corsair CSSD-F40GB2/1.1
     "Corsair Force (3 SSD|GT)|" // SF-2281, tested with Corsair Force 3 SSD/1.3.2, GT/1.3.3
+    "FM-25S2S-(60|120|240)GBP2|" // G.SKILL Phoenix Pro, SF-1200, tested with
+      // FM-25S2S-240GBP2/4.2
     "FTM(06|12|24|48)CT25H|" // Supertalent TeraDrive CT, tested with
       // FTM24CT25H/STTMP2P1
     "KINGSTON SH100S3(120|240)G|" // Hyper-X, SF-2281, tested with SH100S3240G/320ABBF0
-    "OCZ[ -](AGILITY2([ -]EX)?|COLOSSUS2|ONYX2|VERTEX2|VERTEX-LE)( [123]\\..*)?|" // SF-1200,
+    "OCZ[ -](AGILITY2([ -]EX)?|COLOSSUS2|ONYX2|VERTEX(2|-LE))( [123]\\..*)?|" // SF-1200,
       // tested with OCZ-VERTEX2/1.11, OCZ-VERTEX2 3.5/1.11
-    "OCZ-REVODRIVE( X2)?|" // PCIe, SF-1200, tested with OCZ-REVODRIVE( X2)?/1.20
-    "OCZ-REVODRIVE3( X2)?|" // PCIe, SF-2281, tested with OCZ-REVODRIVE3 X2/2.11
+    "OCZ-REVODRIVE3?( X2)?|" // PCIe, SF-1200/2281, tested with
+      // OCZ-REVODRIVE( X2)?/1.20, OCZ-REVODRIVE3 X2/2.11
     "OCZ[ -](VELO|VERTEX2[ -](EX|PRO))( [123]\\..*)?|" // SF-1500, tested with
       // OCZ VERTEX2-PRO/1.10 (Bogus thresholds for attribute 232 and 235)
     "D2[CR]STK251...-....|" // OCZ Deneva 2 C/R, SF-22xx/25xx,
@@ -137,6 +220,9 @@ const drive_settings builtin_knowndrives[] = {
     "OWC Mercury Extreme Pro (RE )?SSD|" // tested with
       // OWC Mercury Extreme Pro SSD/360A13F0
     "Patriot Pyro|" // tested with Patriot Pyro/332ABBF0
+    "(TX32|TX31C1|VN0..GCNMK|VN0...GCNMK).*|" // Smart Storage Systems XceedSTOR
+    "(TX22D1|TX21B1).*|" // Smart Storage Systems XceedIOPS2
+    "TX52D1.*|" // Smart Storage Systems Xcel-200
     "UGB(88P|99S)GC...H[BF].", // Unigen, tested with
       // UGB88PGC100HF2/MP Rev2, UGB99SGC100HB3/RC Rev3
     "", "",
@@ -157,7 +243,7 @@ const drive_settings builtin_knowndrives[] = {
   //"-v 187,raw48,Reported_Uncorrect "
   //"-v 194,tempminmax,Temperature_Celsius "
     "-v 195,raw24/raw32,ECC_Uncorr_Error_Count "
-  //"-v 196,raw48,Reallocated_Event_Count "
+  //"-v 196,raw16(raw16),Reallocated_Event_Count "
     "-v 198,hex48,Uncorrectable_Sector_Ct "
     "-v 199,raw48,SATA_CRC_Error_Count "
     "-v 201,raw24/raw32,Unc_Soft_Read_Err_Rate "
@@ -208,14 +294,15 @@ const drive_settings builtin_knowndrives[] = {
     "-v 212,raw64,SATA_Error_Ct_Handshake "
     "-v 213,raw64,Indilinx_Internal"
   },
-  { "Indilinx Martini based SSDs",
-    "OCZ VERTEX-PLUS", // tested with OCZ VERTEX-PLUS/3.55
+  { "Indilinx Everest/Martini based SSDs",
+    "OCZ VERTEX-PLUS|" // tested with OCZ VERTEX-PLUS/3.55
+    "OCZ-PETROL", // tested with OCZ-PETROL/3.12
     "", "", ""
   //"-v 1,raw48,Raw_Read_Error_Rate "
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
   //"-v 232,raw48,Available_Reservd_Space "
   //"-v 233,raw48,Media_Wearout_Indicator"
@@ -223,10 +310,10 @@ const drive_settings builtin_knowndrives[] = {
   { "Intel X25-E SSDs",
     "SSDSA2SH(032|064)G1.* INTEL",  // G1 = first generation
     "", "",
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 192,raw48,Unsafe_Shutdown_Count "
     "-v 225,raw48,Host_Writes_32MiB "
@@ -239,10 +326,10 @@ const drive_settings builtin_knowndrives[] = {
   { "Intel X18-M/X25-M G1 SSDs",
     "INTEL SSDSA[12]MH(080|160)G1.*",  // G1 = first generation, 50nm
     "", "",
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 192,raw48,Unsafe_Shutdown_Count "
     "-v 225,raw48,Host_Writes_32MiB "
@@ -257,10 +344,10 @@ const drive_settings builtin_knowndrives[] = {
     "INTEL SSDSA[12]M(040|080|120|160)G2.*",  // G2 = second generation, 34nm
     "2CV102(J[89A-Z]|[K-Z].)", // >= "2CV102J8"
     "",
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
   //"-v 184,raw48,End-to-End_Error " // G2 only
     "-v 192,raw48,Unsafe_Shutdown_Count "
@@ -287,10 +374,10 @@ const drive_settings builtin_knowndrives[] = {
   { "Intel 320 Series SSDs", // tested with INTEL SSDSA2CT040G3/4PC10362
     "INTEL SSDSA[12]C[WT](040|080|120|160|300|600)G3",
     "", "",
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 170,raw48,Reserve_Block_Count "
     "-v 171,raw48,Program_Fail_Count "
@@ -310,10 +397,10 @@ const drive_settings builtin_knowndrives[] = {
   { "Intel 710 Series SSDs", // tested with INTEL SSDSA2BZ100G3/6PB10362
     "INTEL SSDSA2BZ(100|200|300)G3",
     "", "",
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 170,raw48,Reserve_Block_Count "
     "-v 171,raw48,Program_Fail_Count "
@@ -322,7 +409,7 @@ const drive_settings builtin_knowndrives[] = {
     "-v 183,raw48,SATA_Downshift_Count "
   //"-v 184,raw48,End-to-End_Error "
   //"-v 187,raw48,Reported_Uncorrect "
-  //"-v 190,raw48,Airflow_Temperature_Cel "
+  //"-v 190,tempminmax,Airflow_Temperature_Cel "
     "-v 192,raw48,Unsafe_Shutdown_Count "
     "-v 225,raw48,Host_Writes_32MiB "
     "-v 226,raw48,Workld_Media_Wear_Indic " // Timed Workload Media Wear Indicator (percent*1024)
@@ -336,16 +423,39 @@ const drive_settings builtin_knowndrives[] = {
   { "Intel 510 Series SSDs",
     "INTEL SSDSC2MH(120|250)A2",
     "", "",
-  //"-v 3,raw48,Spin_Up_Time "
+  //"-v 3,raw16(avg16),Spin_Up_Time "
   //"-v 4,raw48,Start_Stop_Count "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 192,raw48,Unsafe_Shutdown_Count "
     "-v 225,raw48,Host_Writes_32MiB "
   //"-v 232,raw48,Available_Reservd_Space "
   //"-v 233,raw48,Media_Wearout_Indicator"
   },
+  { "Intel 520 Series SSDs", // tested with INTEL SSDSC2CW120A3/400i
+    "INTEL SSDSC2CW(060|120|180|240|480)A3",
+    "", "",
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
+    "-v 9,msec24hour32,Power_On_Hours_and_Msec "
+  //"-v 12,raw48,Power_Cycle_Count "
+    "-v 170,raw48,Available_Reservd_Space "
+    "-v 171,raw48,Program_Fail_Count "
+    "-v 172,raw48,Erase_Fail_Count "
+    "-v 174,raw48,Unexpect_Power_Loss_Ct "
+  //"-v 184,raw48,End-to-End_Error "
+    "-v 187,raw48,Uncorrectable_Error_Cnt "
+  //"-v 192,raw48,Power-Off_Retract_Count "
+    "-v 225,raw48,Host_Writes_32MiB "
+    "-v 226,raw48,Workld_Media_Wear_Indic "
+    "-v 227,raw48,Workld_Host_Reads_Perc "
+    "-v 228,raw48,Workload_Minutes "
+  //"-v 232,raw48,Available_Reservd_Space "
+  //"-v 233,raw48,Media_Wearout_Indicator "
+    "-v 241,raw48,Host_Writes_32MiB "
+    "-v 242,raw48,Host_Reads_32MiB "
+    "-v 249,raw48,NAND_Writes_1GiB"
+  },
   { "Kingston branded X25-V SSDs", // fixed firmware
     "KINGSTON SSDNow 40GB",
     "2CV102(J[89A-Z]|[K-Z].)", // >= "2CV102J8"
@@ -374,7 +484,7 @@ const drive_settings builtin_knowndrives[] = {
     "TS(2|4|8|16|32|64|128|192)GSSD25S?-(M|S)", // Transcend IDE and SATA, tested with TS32GSSD25-M/V090331
     "[BV].*", // other Transcend SSD versions will be catched by subsequent entry
     "",
-  //"-v 9,raw48,Power_On_Hours " // raw value always 0?
+  //"-v 9,raw24(raw8),Power_On_Hours " // raw value always 0?
   //"-v 12,raw48,Power_Cycle_Count "
   //"-v 194,tempminmax,Temperature_Celsius " // raw value always 0?
     "-v 229,hex64:w012345r,Halt_System/Flash_ID " // Halt, Flash[7]
@@ -382,7 +492,7 @@ const drive_settings builtin_knowndrives[] = {
     "-v 233,hex48:w01234,ECC_Fail_Record " // Fail number, Row[3], Channel, Bank
     "-v 234,raw24/raw24:w01234,Avg/Max_Erase_Ct "
     "-v 235,raw24/raw24:w01z23,Good/Sys_Block_Ct"
-    //  1.....................................40 chars limit for smartmontools <= r3343
+    //  1.....................................40 chars limit for smartmontools <= r3342
   },
   { "JMicron based SSDs", // JMicron JMF61x
     "ADATA S596 Turbo|"  // tested with ADATA S596 Turbo 256GB SATA SSD (JMicron JMF616)
@@ -401,10 +511,10 @@ const drive_settings builtin_knowndrives[] = {
   //"-v 1,raw48,Raw_Read_Error_Rate "
   //"-v 2,raw48,Throughput_Performance "
     "-v 3,raw48,Unknown_Attribute "
-  //"-v 5,raw48,Reallocated_Sector_Ct "
+  //"-v 5,raw16(raw16),Reallocated_Sector_Ct "
     "-v 7,raw48,Unknown_Attribute "
     "-v 8,raw48,Unknown_Attribute "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 9,raw24(raw8),Power_On_Hours "
     "-v 10,raw48,Unknown_Attribute "
   //"-v 12,raw48,Power_Cycle_Count "
   //"-v 167,raw48,Unknown_Attribute "
@@ -424,7 +534,7 @@ const drive_settings builtin_knowndrives[] = {
     "SAMSUNG 470 Series SSD|"  // tested with SAMSUNG 470 Series SSD 64GB/AXM09B1Q
     "SAMSUNG SSD 830 Series",  // tested with SAMSUNG SSD 830 Series 64GB/CXM03B1Q
     "", "",
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
   //"-v 175,raw48,Program_Fail_Count_Chip "
   //"-v 176,raw48,Erase_Fail_Count_Chip "
@@ -436,16 +546,54 @@ const drive_settings builtin_knowndrives[] = {
   //"-v 182,raw48,Erase_Fail_Count_Total "
   //"-v 183,raw48,Runtime_Bad_Block "
     "-v 187,raw48,Uncorrectable_Error_Cnt "
-  //"-v 190,raw48,Temperature_Exceed_Cnt "  // seems to be some sort of temperature value for 470 Series?
-  //"-v 194,raw48,Airflow_Temperature "
+  //"-v 190,tempminmax,Airflow_Temperature_Cel "  // seems to be some sort of temperature value for 470 Series?
+  //"-v 194,tempminmax,Temperature_Celsius "
     "-v 195,raw48,ECC_Rate "
   //"-v 198,raw48,Offline_Uncorrectable "
     "-v 199,raw48,CRC_Error_Count "
     "-v 201,raw48,Supercap_Status "
-    "-v 202,raw48,Exception_Mode_Status"
-  //"-v 240,raw48,Unknown_Attribute " // 830 Series
+    "-v 202,raw48,Exception_Mode_Status "
+    "-v 240,raw48,Unknown_Attribute"  // 830 Series
   //"-v 241,raw48,Total_LBAs_Written" // 830 Series
   },
+  { "Smart Storage Systems XceedSecure2 SSDs",
+    "(SMART|Adtron) ([AIS]25FBS|S35FCS).*",
+    "", "",
+    "-v 9,sec2hour,Power_On_Hours "
+    "-v 194,hex64,Proprietary_194"
+  },
+  { "Smart Storage Systems XceedUltraX/Adtron A25FBX SSDs",
+    "(SMART|Adtron) (A|I)25FBX.*",
+    "", "",
+    "-v 9,hex64,Proprietary_9 "
+    "-v 194,hex48,Proprietary_194"
+  },
+  { "Smart Storage Systems Adtron A25FB 2xN SSDs",
+    "(SMART|Adtron) A25FB.*2.N",
+    "", "",
+    "-v 110,hex64,Proprietary_HWC "
+    "-v 111,hex64,Proprietary_MP "
+    "-v 112,hex64,Proprietary_RtR "
+    "-v 113,hex64,Proprietary_RR "
+    "-v 120,hex64,Proprietary_HFAll "
+    "-v 121,hex64,Proprietary_HF1st "
+    "-v 122,hex64,Proprietary_HF2nd "
+    "-v 123,hex64,Proprietary_HF3rd "
+    "-v 125,hex64,Proprietary_SFAll "
+    "-v 126,hex64,Proprietary_SF1st "
+    "-v 127,hex64,Proprietary_SF2nd "
+    "-v 128,hex64,Proprietary_SF3rd "
+    "-v 194,raw24/raw32:zvzzzw,Fract_Temperature"
+    //  1.....................................40 chars limit for smartmontools <= r3342
+  },
+  { "Smart Storage Systems Adtron A25FB 3xN SSDs",
+    "(SMART|Adtron) A25FB-.*3.N",
+    "", "",
+    "-v 9,sec2hour,Power_On_Hours "
+    "-v 113,hex48,Proprietary_RR "
+    "-v 130,raw48:54321,Minimum_Spares_All_Zs"
+  //"-v 194,tempminmax,Temperature_Celsius"
+  },
   { "Transcend CompactFlash Cards", // tested with TRANSCEND/20080820,
       // TS4GCF133/20100709, TS16GCF133/20100709
     "TRANSCEND|TS(4|8|16)GCF133",
@@ -478,8 +626,7 @@ const drive_settings builtin_knowndrives[] = {
     "(IBM-|Hitachi )?IC35L0[12346]0AVER07.*",
     "",
     "IBM Deskstar 60GXP drives may need upgraded SMART firmware.\n"
-    "Please see http://haque.net/dtla_update/ and\n"
-    "http://www.ibm.com/pc/support/site.wss/MIGR-42215.html",
+    "Please see http://haque.net/dtla_update/",
     ""
   },
   { "IBM Deskstar 40GV & 75GXP (A5AA/A6AA firmware)",
@@ -491,8 +638,7 @@ const drive_settings builtin_knowndrives[] = {
     "(IBM-)?DTLA-30[57]0[123467][05].*",
     "",
     "IBM Deskstar 40GV and 75GXP drives may need upgraded SMART firmware.\n"
-    "Please see http://haque.net/dtla_update/ and\n"
-    "http://www.ibm.com/pc/support/site.wss/MIGR-42215.html",
+    "Please see http://haque.net/dtla_update/",
     ""
   },
   { "", // ExcelStor J240, J340, J360, J680, J880 and J8160
@@ -725,7 +871,7 @@ const drive_settings builtin_knowndrives[] = {
     "****** THIS DRIVE MAY OR MAY NOT BE AFFECTED! ******\n"
     "Buggy and fixed firmware report same version number!\n"
     "See the following web pages for details:\n"
-    "http://www.samsung.com/global/business/hdd/faqView.do?b2b_bbs_msg_id=386\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/223571en\n"
     "http://sourceforge.net/apps/trac/smartmontools/wiki/SamsungF4EGBadBlocks",
     ""
   },
@@ -853,7 +999,7 @@ const drive_settings builtin_knowndrives[] = {
     "", // attributes info from http://www.adtron.com/pdf/SMART_Attributes_Xcel-10_810800014_RevB.pdf
     "-v 1,raw48,Not_Supported "
     "-v 2,raw48,Not_Supported "
-  //"-v 9,raw48,Power_On_Hours "
+  //"-v 9,raw24(raw8),Power_On_Hours "
   //"-v 12,raw48,Power_Cycle_Count "
     "-v 191,raw48,Not_Supported "
   //"-v 192,raw48,Power-Off_Retract_Count "
@@ -1085,12 +1231,12 @@ const drive_settings builtin_knowndrives[] = {
   },
   { "Seagate Maxtor DiamondMax 22", // fixed firmware
     "(MAXTOR )?STM3(500320|750330|1000340)AS?",
-    "MX1A", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969
+    "MX1A", // http://knowledge.seagate.com/articles/en_US/FAQ/207969en
     "", ""
   },
   { "Seagate Maxtor DiamondMax 22", // fixed firmware
     "(MAXTOR )?STM3(160813|320614|640323|1000334)AS?",
-    "MX1B", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207975
+    "MX1B", // http://knowledge.seagate.com/articles/en_US/FAQ/207975en
     "", ""
   },
   { "Seagate Maxtor DiamondMax 22", // buggy firmware
@@ -1099,8 +1245,8 @@ const drive_settings builtin_knowndrives[] = {
     "There are known problems with these drives,\n"
     "AND THIS FIRMWARE VERSION IS AFFECTED,\n"
     "see the following Seagate web pages:\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969",
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207931en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207969en",
     ""
   },
   { "Seagate Maxtor DiamondMax 22", // unknown firmware
@@ -1108,9 +1254,9 @@ const drive_settings builtin_knowndrives[] = {
     "",
     "There are known problems with these drives,\n"
     "see the following Seagate web pages:\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207975",
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207931en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207969en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207975en",
     ""
   },
   { "Seagate Maxtor DiamondMax 23",
@@ -1368,6 +1514,10 @@ const drive_settings builtin_knowndrives[] = {
     "(Hitachi )?HDS7210((16|25)CLA382|(32|50)CLA362|(64|75|10)CLA332)",
     "", "", ""
   },
+  { "Hitachi Deskstar 7K1000.D", // tested with HDS721010DLE630/MS2OA5Q0
+    "Hitachi HDS7210(25|32|50|75|10)DLE630",
+    "", "", ""
+  },
   { "Hitachi Deskstar E7K1000", // tested with HDE721010SLA330/ST6OA31B
     "Hitachi HDE7210(50|75|10)SLA330",
     "", "", ""
@@ -1474,12 +1624,12 @@ const drive_settings builtin_knowndrives[] = {
     "ST9(2014|3015|4019)A",
     "", "", ""
   },
-  { "Seagate Momentus 4200.2",
-    "ST9(100822|808210|60821|50212|402113|30219)A",
+  { "Seagate Momentus 4200.2", // tested with ST960812A/3.05
+    "ST9(100822|808210|60812|50212|402113|30219)A",
     "", "", ""
   },
   { "Seagate Momentus 5400.2",
-    "ST9(808211|60822|408114|308110|120821|10082[34]|8823|6812|4813|3811)AS?",
+    "ST9(808211|6082[12]|408114|308110|120821|10082[34]|8823|6812|4813|3811)AS?",
     "", "", ""
   },
   { "Seagate Momentus 5400.3",
@@ -1537,7 +1687,7 @@ const drive_settings builtin_knowndrives[] = {
   },
   { "Seagate Momentus XT", // fixed firmware
     "ST9(2505610|3205620|5005620)AS",
-    "SD2[68]",
+    "SD2[68]", // http://knowledge.seagate.com/articles/en_US/FAQ/215451en
     "", ""
   },
   { "Seagate Momentus XT", // buggy firmware, tested with ST92505610AS/SD24
@@ -1546,6 +1696,7 @@ const drive_settings builtin_knowndrives[] = {
     "These drives may corrupt large files,\n"
     "AND THIS FIRMWARE VERSION IS AFFECTED,\n"
     "see the following web pages for details:\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/215451en\n"
     "http://forums.seagate.com/t5/Momentus-XT-Momentus-Momentus/Momentus-XT-corrupting-large-files-Linux/td-p/109008\n"
     "http://superuser.com/questions/313447/seagate-momentus-xt-corrupting-files-linux-and-mac",
     ""
@@ -1555,6 +1706,7 @@ const drive_settings builtin_knowndrives[] = {
     "",
     "These drives may corrupt large files,\n"
     "see the following web pages for details:\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/215451en\n"
     "http://forums.seagate.com/t5/Momentus-XT-Momentus-Momentus/Momentus-XT-corrupting-large-files-Linux/td-p/109008\n"
     "http://superuser.com/questions/313447/seagate-momentus-xt-corrupting-files-linux-and-mac",
     ""
@@ -1641,17 +1793,17 @@ const drive_settings builtin_knowndrives[] = {
   },
   { "Seagate Barracuda 7200.11", // unaffected firmware
     "ST3(160813|320[68]13|500[368]20|640[36]23|640[35]30|750[36]30|1000(333|[36]40)|1500341)AS?",
-    "CC.?.?", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957
+    "CC.?.?", // http://knowledge.seagate.com/articles/en_US/FAQ/207957en
     "", ""
   },
   { "Seagate Barracuda 7200.11", // fixed firmware
     "ST3(500[368]20|750[36]30|1000340)AS?",
-    "SD1A", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951
+    "SD1A", // http://knowledge.seagate.com/articles/en_US/FAQ/207951en
     "", ""
   },
   { "Seagate Barracuda 7200.11", // fixed firmware
     "ST3(160813|320[68]13|640[36]23|1000333|1500341)AS?",
-    "SD[12]B", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957
+    "SD[12]B", // http://knowledge.seagate.com/articles/en_US/FAQ/207957en
     "", ""
   },
   { "Seagate Barracuda 7200.11", // buggy or fixed firmware
@@ -1660,8 +1812,8 @@ const drive_settings builtin_knowndrives[] = {
     "There are known problems with these drives,\n"
     "THIS DRIVE MAY OR MAY NOT BE AFFECTED,\n"
     "see the following web pages for details:\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207931en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207951en\n"
     "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632758",
     ""
   },
@@ -1670,13 +1822,13 @@ const drive_settings builtin_knowndrives[] = {
     "",
     "There are known problems with these drives,\n"
     "see the following Seagate web pages:\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957",
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207931en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207951en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207957en",
     ""
   },
-  { "Seagate Barracuda 7200.12", // tested with ST3250312AS/JC45, ST31000524AS/JC45
-    "ST3(160318|25031[128]|320418|50041[08]|750(518|52[38])|100052[348])AS",
+  { "Seagate Barracuda 7200.12", // tested with ST3250312AS/JC45, ST31000524AS/JC45, ST3500413AS/JC4B
+    "ST3(160318|25031[128]|320418|50041[038]|750(518|52[38])|100052[348])AS",
     "", "", ""
   },
   { "Seagate Barracuda ES",
@@ -1685,7 +1837,7 @@ const drive_settings builtin_knowndrives[] = {
   },
   { "Seagate Barracuda ES.2", // fixed firmware
     "ST3(25031|50032|75033|100034)0NS",
-    "SN[01]6|"         // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207963
+    "SN[01]6|"         // http://knowledge.seagate.com/articles/en_US/FAQ/207963en
     "MA(0[^7]|[^0].)", // http://dellfirmware.seagate.com/dell_firmware/DellFirmwareRequest.jsp
     "", ""
   },
@@ -1703,8 +1855,8 @@ const drive_settings builtin_knowndrives[] = {
     "",
     "There are known problems with these drives,\n"
     "see the following Seagate web pages:\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n"
-    "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207963",
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207931en\n"
+    "http://knowledge.seagate.com/articles/en_US/FAQ/207963en",
     ""
   },
   { "Seagate Barracuda LP",
@@ -1768,8 +1920,8 @@ const drive_settings builtin_knowndrives[] = {
     "ST3(250311|500410|1000525)SV",
     "", "", ""
   },
-  { "Seagate SV35",
-    "ST(2000VX002|31000526SV|3500411SV)",
+  { "Seagate SV35", // tested with ST2000VX000-9YW164/CV12
+    "ST([123]000VX00[20]|31000526SV|3500411SV)(-.*)?",
     "", "", ""
   },
   { "Seagate DB35", // tested with ST3250823ACE/3.03
@@ -1901,8 +2053,8 @@ const drive_settings builtin_knowndrives[] = {
     "WDC WD(5000AB|7500AY|1000FY)PS-.*",
     "", "", ""
   },
-  { "Western Digital RE3 Serial ATA",
-    "WDC WD((25|32|50)02A|(75|10)02F)BYS-.*",
+  { "Western Digital RE3 Serial ATA", // tested with WDC WD7502ABYS-02A6B0/03.00C06
+    "WDC WD((25|32|50|75)02A|(75|10)02F)BYS-.*",
     "", "", ""
   },
   { "Western Digital RE4 Serial ATA",
@@ -1942,8 +2094,12 @@ const drive_settings builtin_knowndrives[] = {
     "WDC WD(16|25|32)00AVJS-.*",
     "", "", ""
   },
-  { "Western Digital AV-GP", // tested with WDC WD10EURS-630AB1/80.00A80
-    "WDC WD((16|25|32|50|64|75)00AVVS|(50|75)00AVCS|(10|15|20|25|30)EURS|10EVVS|(10|20)EVCS|(10|15|20)EVDS)-.*",
+  { "Western Digital AV-GP",
+    "WDC WD((16|25|32|50|64|75)00AV[CDV]S|(10|15|20)EV[CDV]S)-.*",
+    "", "", ""
+  },
+  { "Western Digital AV-GP (Adv. Format)", // tested with WDC WD10EURS-630AB1/80.00A80, WDC WD10EUCX-63YZ1Y0/51.0AB52
+    "WDC WD(7500AURS|10EU[CR]X|(10|15|20|25|30)EURS)-.*",
     "", "", ""
   },
   { "Western Digital AV-25",
@@ -2140,7 +2296,7 @@ const drive_settings builtin_knowndrives[] = {
     "-d usbjmicron"
   },
   { "USB: Samsung Story Station; ",
-    "0x04e8:0x5f06",
+    "0x04e8:0x5f0[56]",
     "",
     "",
     "-d sat"
@@ -2358,6 +2514,12 @@ const drive_settings builtin_knowndrives[] = {
     "",
     "-d usbsunplus"
   },
+  { "USB: Toshiba STOR.E; ",
+    "0x0930:0x0b1b",
+    "", // 0x0001
+    "",
+    "-d sat"
+  },
   // Oxford Semiconductor, Ltd
   { "USB: ; Oxford",
     "0x0928:0x0000",
@@ -2423,7 +2585,7 @@ const drive_settings builtin_knowndrives[] = {
     "-d sat"
   },
   { "USB: Seagate Expansion External; ", // 2TB
-    "0x0bc2:0x3300",
+    "0x0bc2:0x33(00|32)",
     "",
     "",
     "-d sat"
index 9e89d402198bc4ecb10c6225ac35396094c620a5..5038b1219ecc52e6aff98c95e677ec81cf308586 100644 (file)
@@ -74,7 +74,7 @@
 #define PATHINQ_SETTINGS_SIZE   128
 #endif
 
-const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp 3502 2012-01-26 09:41:05Z samm2 $" \
+const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp 3525 2012-03-22 08:54:52Z samm2 $" \
 ATACMDS_H_CVSID CCISS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_FREEBSD_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID;
 
 #define NO_RETURN 0
@@ -931,7 +931,7 @@ int freebsd_highpoint_device::ata_command_interface(smart_command_set command, i
 
 
 /////////////////////////////////////////////////////////////////////////////
-/// Implement standard SCSI support with old functions
+/// Standard SCSI support
 
 class freebsd_scsi_device
 : public /*implements*/ scsi_device,
index befd673002800353025f1d9f883b655b353f50d2..1ab57490b38fc9d5cfb85b1362a17be4b19c811b 100644 (file)
@@ -85,7 +85,7 @@
 #define SELECT_WIN_32_64(x32, x64) (x64)
 #endif
 
-const char * os_win32_cpp_cvsid = "$Id: os_win32.cpp 3521 2012-03-06 21:15:25Z chrfranke $";
+const char * os_win32_cpp_cvsid = "$Id: os_win32.cpp 3524 2012-03-21 22:19:31Z chrfranke $";
 
 // Disable Win9x/ME specific code if no longer supported by compiler.
 #ifdef _WIN64
@@ -543,6 +543,10 @@ public:
 
   virtual std::string get_app_examples(const char * appname);
 
+#ifndef __CYGWIN__
+  virtual int64_t get_timer_usec();
+#endif
+
 //virtual bool scan_smart_devices(smart_device_list & devlist, const char * type,
 //  const char * pattern = 0);
 
@@ -684,6 +688,31 @@ std::string win_smart_interface::get_os_version_str()
   return vstr;
 }
 
+#ifndef __CYGWIN__
+// MSVCRT only provides ftime() which uses GetSystemTime()
+// This provides only ~15ms resolution by default.
+// Use QueryPerformanceCounter instead (~300ns).
+// (Cygwin provides CLOCK_MONOTONIC which has the same effect)
+int64_t win_smart_interface::get_timer_usec()
+{
+  static int64_t freq = 0;
+
+  LARGE_INTEGER t;
+  if (freq == 0)
+    freq = (QueryPerformanceFrequency(&t) ? t.QuadPart : -1);
+  if (freq <= 0)
+    return smart_interface::get_timer_usec();
+
+  if (!QueryPerformanceCounter(&t))
+    return -1;
+  if (!(0 <= t.QuadPart && t.QuadPart <= (int64_t)(~(uint64_t)0 >> 1)/1000000))
+    return -1;
+
+  return (t.QuadPart * 1000000LL) / freq;
+}
+#endif // __CYGWIN__
+
+
 // Return value for device detection functions
 enum win_dev_type { DEV_UNKNOWN = 0, DEV_ATA, DEV_SCSI, DEV_USB };
 
index 49620a4f298b99bed81d46e35d7b4dc5489ea9f9..5034ff66ec7acf8c60b8ac20caed24355add5a43 100644 (file)
@@ -1,7 +1,7 @@
 .ig
  Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 
- $Id: smartctl.8.in 3519 2012-03-06 20:01:44Z chrfranke $
+ $Id: smartctl.8.in 3530 2012-03-27 19:54:06Z chrfranke $
  
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
@@ -943,7 +943,7 @@ attributes are listed if recognised. The attributes are output in a
 relatively free format (compared with ATA disk attributes).
 .TP
 .B \-f FORMAT, \-\-format=FORMAT
-[ATA only] Selects the output format of the attributes to one of:
+[ATA only] Selects the output format of the attributes:
 
 .I old
 \- Old smartctl format. This is the default unless the \'\-x\' option is
@@ -953,6 +953,15 @@ specified.
 \- New format which fits into 80 colums (except in some rare cases).
 This format also decodes four additional attribute flags.
 This is the default if the '\-x\' option is specified.
+
+.I hex,id
+\- Print all attribute IDs as hexadecimal numbers.
+
+.I hex,val
+\- Print all normalized values as hexadecimal numbers.
+
+.I hex
+\- Same as \'\-f hex,id \-f hex,val\'.
 .TP
 .B \-l TYPE, \-\-log=TYPE
 Prints either the SMART Error Log, the SMART Self\-Test Log, the SMART
@@ -1284,15 +1293,23 @@ This is the default for most attributes.
 \- Print the Raw value as a 12 digit hexadecimal number.
 This may be useful for decoding the meaning of the Raw value.
 
+.I raw56
+\- Print the Raw value as a 54\-bit unsigned base\-10 integer.
+This includes the reserved byte which follows the 48\-bit raw value.
+
+.I hex56
+\- Print the Raw value as a 14 digit hexadecimal number.
+This includes the reserved byte which follows the 48\-bit raw value.
+
 .I raw64
 \- Print the Raw value as a 64\-bit unsigned base\-10 integer.
 This includes two bytes from the normalized and worst attribute value.
-This new raw format is used by some recent SSD devices.
+This raw format is used by some SSD devices with Indilinx controller.
 
 .I hex64
 \- Print the Raw value as a 16 digit hexadecimal number.
 This includes two bytes from the normalized and worst attribute value.
-This new raw format is used by some recent SSD devices.
+This raw format is used by some SSD devices with Indilinx controller.
 
 .I min2hour
 \- Raw Attribute is power\-on time in minutes.  Its raw value
@@ -1340,6 +1357,11 @@ for Attributes 5 and 196.
 and an optional "Average" 16-bit value if the word is nonzero.
 This is the default for Attribute 3.
 
+.I raw24(raw8)
+\- Print the raw attribute as a 24\-bit value and three optional
+8\-bit values if these bytes are nonzero.  This is the default
+for Attribute 9.
+
 .I raw24/raw24
 \- Raw Attribute contains two 24\-bit values. The first is the
 number of load cycles.  The second is the number of unload cycles.
@@ -2142,4 +2164,4 @@ Links to these and other documents may be found on the Links page of the
 
 .SH
 SVN ID OF THIS PAGE:
-$Id: smartctl.8.in 3519 2012-03-06 20:01:44Z chrfranke $
+$Id: smartctl.8.in 3530 2012-03-27 19:54:06Z chrfranke $
index 7fad09e8ef880cf6d096f9a920e0d27a011c87f4..9b414e0a8b8b8b69a9a1646082fb5c6d27337b42 100644 (file)
@@ -55,7 +55,7 @@
 #include "smartctl.h"
 #include "utility.h"
 
-const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3517 2012-03-06 19:44:42Z chrfranke $"
+const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3531 2012-03-27 20:02:25Z chrfranke $"
   CONFIG_H_CVSID SMARTCTL_H_CVSID;
 
 // Globals to control printing
@@ -135,7 +135,7 @@ static void Usage()
 "  -A, --attributes\n"
 "        Show device SMART vendor-specific Attributes and values\n\n"
 "  -f FORMAT, --format=FORMAT                                          (ATA)\n"
-"        Set output format for attributes to one of: old, brief\n\n"
+"        Set output format for attributes: old, brief, hex[,id|val]\n\n"
 "  -l TYPE, --log=TYPE\n"
 "        Show device log. TYPE: error, selftest, selective, directory[,g|s],\n"
 "                               xerror[,N][,error], xselftest[,N][,selftest],\n"
@@ -218,7 +218,7 @@ static std::string getvalidarglist(int opt)
   case 'n':
     return "never, sleep, standby, idle";
   case 'f':
-    return "old, brief";
+    return "old, brief, hex[,id|val]";
   case 'g':
     return "aam, apm, lookahead, security, wcache";
   case opt_set:
@@ -627,7 +627,7 @@ static const char * parse_options(int argc, char** argv,
       scsiopts.smart_ss_media_log = true;
       scsiopts.sasphy = true;
       if (!output_format_set)
-        ataopts.output_format = 1; // '-f brief'
+        ataopts.output_format |= ata_print_options::FMT_BRIEF;
       break;
     case 'v':
       // parse vendor-specific definitions of attributes
@@ -764,14 +764,23 @@ static const char * parse_options(int argc, char** argv,
         badarg = true;
       break;
     case 'f':
-      output_format_set = true;
-      if (!strcmp(optarg,"old")) {
-        ataopts.output_format = 0;
-      } else if (!strcmp(optarg,"brief")) {
-        ataopts.output_format = 1;
-      } else {
-        badarg = true;
+      if (!strcmp(optarg, "old")) {
+        ataopts.output_format &= ~ata_print_options::FMT_BRIEF;
+        output_format_set = true;
+      }
+      else if (!strcmp(optarg, "brief")) {
+        ataopts.output_format |= ata_print_options::FMT_BRIEF;
+        output_format_set = true;
       }
+      else if (!strcmp(optarg, "hex"))
+        ataopts.output_format |= ata_print_options::FMT_HEX_ID
+                              |  ata_print_options::FMT_HEX_VAL;
+      else if (!strcmp(optarg, "hex,id"))
+        ataopts.output_format |= ata_print_options::FMT_HEX_ID;
+      else if (!strcmp(optarg, "hex,val"))
+        ataopts.output_format |= ata_print_options::FMT_HEX_VAL;
+      else
+        badarg = true;
       break;
     case 'B':
       {
index d725f67018b54e29dcef899f724069076916b4dc..d3f7cc63568c22cfa0a5d6509b712c257b57107a 100644 (file)
@@ -1,7 +1,7 @@
 .ig
 Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
  
-$Id: smartd.8.in 3497 2011-12-13 20:17:08Z chrfranke $
+$Id: smartd.8.in 3529 2012-03-25 17:26:10Z chrfranke $
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -217,7 +217,7 @@ information to STDOUT rather than logging it to SYSLOG and does not
 \fBfork(2)\fP into the background and detach from the controlling
 terminal.  In this mode, \fBsmartd\fP also prints more verbose
 information about what it is doing than when operating in "daemon"
-mode. In this mode, the \fBQUIT\fP signal (normally generated from a
+mode. In this mode, the \fBINT\fP signal (normally generated from a
 terminal with CONTROL\-C) makes \fBsmartd\fP reload its configuration
 file.  Please use CONTROL-\e to exit
 .\" %IF OS Windows
@@ -788,4 +788,4 @@ Links to these and other documents may be found on the Links page of the
 
 .SH
 SVN ID OF THIS PAGE:
-$Id: smartd.8.in 3497 2011-12-13 20:17:08Z chrfranke $
+$Id: smartd.8.in 3529 2012-03-25 17:26:10Z chrfranke $