Ticket #290: patch-raw8_raw32

File patch-raw8_raw32, 1.9 KB (added by Dan Lukes, 11 years ago)
Line 
1Index: atacmds.cpp
2===================================================================
3--- atacmds.cpp (revision 3848)
4+++ atacmds.cpp (working copy)
5@@ -129,6 +129,7 @@
6 {"msec24hour32" , RAWFMT_MSEC24_HOUR32},
7 {"tempminmax" , RAWFMT_TEMPMINMAX},
8 {"temp10x" , RAWFMT_TEMP10X},
9+ {"raw8/raw32" , RAWFMT_RAW8_DIV_RAW32},
10 };
11
12 const unsigned num_format_names = sizeof(format_names)/sizeof(format_names[0]);
13@@ -1897,6 +1898,7 @@
14 case RAWFMT_RAW56:
15 case RAWFMT_HEX56:
16 case RAWFMT_RAW24_DIV_RAW32:
17+ case RAWFMT_RAW8_DIV_RAW32:
18 case RAWFMT_MSEC24_HOUR32:
19 byteorder = "r543210"; break;
20 default:
21@@ -2009,6 +2011,10 @@
22 s = strprintf("%u/%u",
23 (unsigned)(rawvalue >> 32), (unsigned)(rawvalue & 0xffffffffULL));
24 break;
25+ case RAWFMT_RAW8_DIV_RAW32:
26+ s = strprintf("%u/%u",
27+ raw[0], (unsigned)((rawvalue >> 8) & 0xffffffffULL));
28+ break;
29
30 case RAWFMT_MIN2HOUR:
31 {
32Index: atacmds.h
33===================================================================
34--- atacmds.h (revision 3848)
35+++ atacmds.h (working copy)
36@@ -679,6 +679,7 @@
37 RAWFMT_MSEC24_HOUR32,
38 RAWFMT_TEMPMINMAX,
39 RAWFMT_TEMP10X,
40+ RAWFMT_RAW8_DIV_RAW32,
41 };
42
43 // Attribute flags
44Index: smartctl.8.in
45===================================================================
46--- smartctl.8.in (revision 3848)
47+++ smartctl.8.in (working copy)
48@@ -1462,6 +1462,12 @@
49 \- Raw attribute is an error rate which consists of a 24-bit error
50 count and a 32-bit total count.
51
52+.I raw8/raw32
53+\- Raw Attribute contains 8-bit value, followed by 32-bit values.
54+Used by Intel in Thermal Throtle Status attribute. The first is the
55+throttle status reported as integer percentage. The second is number
56+of times the thermal throttle has activated over lifetime.
57+
58 The following old arguments to \'\-v\' are also still valid:
59
60 .I 9,minutes