1
1

smartctl.cpp: add new --log=tapedevstat to print out SCSI Tape (SSC) Device Statistics log page

git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5317 4ea69e1a-61f1-4043-bf83-b5c94c648137
Этот коммит содержится в:
dpgilbert 2022-02-17 03:25:14 +00:00
родитель a00c809df6
Коммит 98b87ae6d2
4 изменённых файлов: 17 добавлений и 3 удалений

Просмотреть файл

@ -1,5 +1,13 @@
$Id$
2022-02-16 Douglas Gilbert <dgilbert@interlog.com>
smartctl.cpp: add new --log=tapedevstat to print out SCSI
Tape (SSC) Device Statistics log page. '-a' does not include
this log page, but '-x' does. May add new --log= option
soon (probably 'tapealert' which must be invoked explicitly);
manpage needs updating
2022-02-09 Alex Samorukov <samm@os2.kiev.ua>
Remove cppcheck 2.7 warning as we are using it now on our CI builds

Просмотреть файл

@ -3441,7 +3441,7 @@ scsiPrintMain(scsi_device * device, const scsi_print_options & options)
any_output = true;
}
if (options.smart_background_log && is_tape) {
if (options.tape_device_stats && is_tape) {
if (! checkedSupportedLogPages)
scsiGetSupportedLogPages(device);
res = 0;

Просмотреть файл

@ -41,6 +41,8 @@ struct scsi_print_options
bool smart_env_rep = false;
bool sasphy = false, sasphy_reset = false;
bool tape_device_stats = false;
bool get_wce = false, get_rcd = false;
short int set_wce = 0, set_rcd = 0; // disable(-1), enable(1) cache

Просмотреть файл

@ -177,7 +177,8 @@ static void Usage()
" xerror[,N][,error], xselftest[,N][,selftest], background,\n"
" sasphy[,reset], sataphy[,reset], scttemp[sts,hist],\n"
" scttempint,N[,p], scterc[,N,M][,p|reset], devstat[,N], defects[,N],\n"
" ssd, gplog,N[,RANGE], smartlog,N[,RANGE], nvmelog,N,SIZE\n\n"
" ssd, gplog,N[,RANGE], smartlog,N[,RANGE], nvmelog,N,SIZE\n"
" tapedevstat\n\n"
" -v N,OPTION , --vendorattribute=N,OPTION (ATA)\n"
" Set display OPTION for vendor Attribute N (see man page)\n\n"
" -F TYPE, --firmwarebug=TYPE (ATA)\n"
@ -245,7 +246,7 @@ static std::string getvalidarglist(int opt)
"scttemp[sts,hist], scttempint,N[,p], "
"scterc[,N,M][,p|reset], devstat[,N], defects[,N], "
"ssd, gplog,N[,RANGE], smartlog,N[,RANGE], "
"nvmelog,N,SIZE";
"nvmelog,N,SIZE, tapedevstat";
case 'P':
return "use, ignore, show, showall";
case 't':
@ -549,6 +550,8 @@ static int parse_options(int argc, char** argv, const char * & type,
ataopts.sct_temp_sts = true;
} else if (!strcmp(optarg,"scttemphist")) {
ataopts.sct_temp_hist = true;
} else if (!strcmp(optarg,"tapedevstat")) {
scsiopts.tape_device_stats = true;
} else if (!strncmp(optarg, "scttempint,", sizeof("scstempint,")-1)) {
unsigned interval = 0; int n1 = -1, n2 = -1, len = strlen(optarg);
@ -739,6 +742,7 @@ static int parse_options(int argc, char** argv, const char * & type,
scsiopts.smart_ss_media_log = true;
scsiopts.sasphy = true;
scsiopts.smart_env_rep = true;
scsiopts.tape_device_stats = true;
if (!output_format_set)
ataopts.output_format |= ata_print_options::FMT_BRIEF;
break;