Skip to content
Snippets Groups Projects
Commit 8d838055 authored by chrfranke's avatar chrfranke
Browse files

smartctl: Limit default number of printed entries for

'-l xerror' to 8, for '-l xselftest' to 25.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2854 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 58dda346
Branches
Tags
No related merge requests found
...@@ -42,6 +42,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -42,6 +42,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] smartctl: Limit default number of printed entries for
'-l xerror' to 8, for '-l xselftest' to 25.
[CF] smartctl: Fix number of entries in '-l xselftest' output. [CF] smartctl: Fix number of entries in '-l xselftest' output.
[CF] Add USB IDs of a SunplusIT bridge, three WD drives, and an [CF] Add USB IDs of a SunplusIT bridge, three WD drives, and an
......
...@@ -853,10 +853,11 @@ it provides sufficient space to log the contents of the 48-bit ...@@ -853,10 +853,11 @@ it provides sufficient space to log the contents of the 48-bit
LBA register set introduced with ATA-6. It also supports logs LBA register set introduced with ATA-6. It also supports logs
with more than one sector. Each sector holds up to 4 log entries. with more than one sector. Each sector holds up to 4 log entries.
The actual number of log sectors is vendor specific, typical values The actual number of log sectors is vendor specific, typical values
are 2 (Samsung), 5 (Seagate) or 6 (WD). for HDD are 2 (Samsung), 5 (Seagate) or 6 (WD). Some recent SSD devices
have much larger error logs.
If the optional parameter NUM is specified, only the NUM most Only the 8 most recent error log entries are printed by default.
recent log entries are printed. Otherwise, all entries are printed. This number can be changed by the optional parameter NUM.
If ',error' is appended and the Extended Comprehensive SMART error If ',error' is appended and the Extended Comprehensive SMART error
log is not supported, the Summary SMART self-test log is printed. log is not supported, the Summary SMART self-test log is printed.
...@@ -909,8 +910,8 @@ and logs with more than one sector. Each sector holds up to 19 log ...@@ -909,8 +910,8 @@ and logs with more than one sector. Each sector holds up to 19 log
entries. The actual number of log sectors is vendor specific, typical entries. The actual number of log sectors is vendor specific, typical
values are 1 (Seagate) or 2 (Samsung). values are 1 (Seagate) or 2 (Samsung).
If the optional parameter NUM is specified, only the NUM most Only the 25 most recent log entries are printed by default. This number
recent log entries are printed. Otherwise, all entries are printed. can be changed by the optional parameter NUM.
If ',selftest' is appended and the Extended SMART self-test log is not If ',selftest' is appended and the Extended SMART self-test log is not
supported, the old SMART self-test log is printed. supported, the old SMART self-test log is printed.
......
...@@ -443,7 +443,7 @@ const char * parse_options(int argc, char** argv, ...@@ -443,7 +443,7 @@ const char * parse_options(int argc, char** argv,
} else if (!strncmp(optarg, "xerror", sizeof("xerror")-1)) { } else if (!strncmp(optarg, "xerror", sizeof("xerror")-1)) {
int n1 = -1, n2 = -1, len = strlen(optarg); int n1 = -1, n2 = -1, len = strlen(optarg);
unsigned val = ~0U; unsigned val = 8;
sscanf(optarg, "xerror%n,error%n", &n1, &n2); sscanf(optarg, "xerror%n,error%n", &n1, &n2);
if (!(n1 == len || n2 == len)) { if (!(n1 == len || n2 == len)) {
n1 = n2 = -1; n1 = n2 = -1;
...@@ -458,7 +458,7 @@ const char * parse_options(int argc, char** argv, ...@@ -458,7 +458,7 @@ const char * parse_options(int argc, char** argv,
} else if (!strncmp(optarg, "xselftest", sizeof("xselftest")-1)) { } else if (!strncmp(optarg, "xselftest", sizeof("xselftest")-1)) {
int n1 = -1, n2 = -1, len = strlen(optarg); int n1 = -1, n2 = -1, len = strlen(optarg);
unsigned val = ~0U; unsigned val = 25;
sscanf(optarg, "xselftest%n,selftest%n", &n1, &n2); sscanf(optarg, "xselftest%n,selftest%n", &n1, &n2);
if (!(n1 == len || n2 == len)) { if (!(n1 == len || n2 == len)) {
n1 = n2 = -1; n1 = n2 = -1;
...@@ -522,8 +522,10 @@ const char * parse_options(int argc, char** argv, ...@@ -522,8 +522,10 @@ const char * parse_options(int argc, char** argv,
ataopts.smart_check_status = scsiopts.smart_check_status = true; ataopts.smart_check_status = scsiopts.smart_check_status = true;
ataopts.smart_general_values = true; ataopts.smart_general_values = true;
ataopts.smart_vendor_attrib = scsiopts.smart_vendor_attrib = true; ataopts.smart_vendor_attrib = scsiopts.smart_vendor_attrib = true;
ataopts.smart_ext_error_log = ataopts.smart_ext_selftest_log = ~0U; ataopts.smart_ext_error_log = 8;
ataopts.retry_error_log = ataopts.retry_selftest_log = true; ataopts.retry_error_log = true;
ataopts.smart_ext_selftest_log = 25;
ataopts.retry_selftest_log = true;
scsiopts.smart_error_log = scsiopts.smart_selftest_log = true; scsiopts.smart_error_log = scsiopts.smart_selftest_log = true;
ataopts.smart_selective_selftest_log = true; ataopts.smart_selective_selftest_log = true;
ataopts.smart_logdir = ataopts.gp_logdir = true; ataopts.smart_logdir = ataopts.gp_logdir = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment