#include "smartctl.h"
#include "utility.h"
-const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3726 2012-12-12 20:02:48Z chrfranke $"
+const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3826 2013-07-06 21:57:29Z samm2 $"
CONFIG_H_CVSID SMARTCTL_H_CVSID;
// Globals to control printing
" --identify[=[w][nvb]]\n"
" Show words and bits from IDENTIFY DEVICE data (ATA)\n\n"
" -g NAME, --get=NAME\n"
-" Get device setting: all, aam, apm, lookahead, security, wcache, rcache\n\n"
+" Get device setting: all, aam, apm, lookahead, security, wcache, rcache, wcreorder\n\n"
" -a, --all\n"
" Show all SMART information for device\n\n"
" -x, --xall\n"
" -s NAME[,VALUE], --set=NAME[,VALUE]\n"
" Enable/disable/change device setting: aam,[N|off], apm,[N|off],\n"
" lookahead,[on|off], security-freeze, standby,[N|off|now],\n"
-" wcache,[on|off], rcache,[on|off]\n\n"
+" wcache,[on|off], rcache,[on|off], wcreorder,[on|off]\n\n"
);
printf(
"======================================= READ AND DISPLAY DATA OPTIONS =====\n\n"
case 'f':
return "old, brief, hex[,id|val]";
case 'g':
- return "aam, apm, lookahead, security, wcache, rcache";
+ return "aam, apm, lookahead, security, wcache, rcache, wcreorder";
case opt_set:
return "aam,[N|off], apm,[N|off], lookahead,[on|off], security-freeze, "
- "standby,[N|off|now], wcache,[on|off], rcache,[on|off]";
+ "standby,[N|off|now], wcache,[on|off], rcache,[on|off], wcreorder,[on|off]";
case 's':
return getvalidarglist(opt_smart)+", "+getvalidarglist(opt_set);
case opt_identify:
ataopts.smart_logdir = ataopts.gp_logdir = true;
ataopts.sct_temp_sts = ataopts.sct_temp_hist = true;
ataopts.sct_erc_get = true;
+ ataopts.sct_wcache_reorder_get = true;
ataopts.devstat_all_pages = true;
ataopts.sataphy = true;
ataopts.get_set_used = true;
else
badarg = true;
}
+ else if (!strcmp(name, "wcreorder")) {
+ if (get) {
+ ataopts.sct_wcache_reorder_get = true;
+ }
+ else if (off)
+ ataopts.sct_wcache_reorder_set = -1;
+ else if (on)
+ ataopts.sct_wcache_reorder_set = 1;
+ else
+ badarg = true;
+ }
else if (!strcmp(name, "rcache")) {
if (get)
scsiopts.get_rcd = true;