smartmontools  SVN Rev 4115
Utility to control and monitor storage systems with "S.M.A.R.T."
Enumerations | Functions | Variables
smartctl.cpp File Reference
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdexcept>
#include <getopt.h>
#include "config.h"
#include "int64.h"
#include "atacmds.h"
#include "dev_interface.h"
#include "ataprint.h"
#include "knowndrives.h"
#include "scsicmds.h"
#include "scsiprint.h"
#include "smartctl.h"
#include "utility.h"
Include dependency graph for smartctl.cpp:

Go to the source code of this file.

Enumerations

enum  {
  opt_identify = 1000, opt_scan, opt_scan_open, opt_set,
  opt_smart
}
 
enum  checksum_err_mode_t { CHECKSUM_ERR_WARN, CHECKSUM_ERR_EXIT, CHECKSUM_ERR_IGNORE }
 

Functions

static void printslogan ()
 
static void UsageSummary ()
 
static std::string getvalidarglist (int opt)
 
static void Usage ()
 
static void printvalidarglistmessage (int opt)
 
static void scan_devices (const char *type, bool with_open, char **argv)
 
static const char * parse_options (int argc, char **argv, ata_print_options &ataopts, scsi_print_options &scsiopts, bool &print_type_only)
 
void pout (const char *fmt,...)
 
void failuretest (failure_type type, int returnvalue)
 
void checksumwarning (const char *string)
 
static const char * get_protocol_info (const smart_device *dev)
 
static int main_worker (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

const char * smartctl_cpp_cvsid
 
bool printing_is_switchable = false
 
bool printing_is_off = false
 
static checksum_err_mode_t checksum_err_mode = CHECKSUM_ERR_WARN
 
bool failuretest_conservative = false
 
unsigned char failuretest_permissive = 0
 

Enumeration Type Documentation

anonymous enum
Enumerator
opt_identify 
opt_scan 
opt_scan_open 
opt_set 
opt_smart 

Definition at line 181 of file smartctl.cpp.

Enumerator
CHECKSUM_ERR_WARN 
CHECKSUM_ERR_EXIT 
CHECKSUM_ERR_IGNORE 

Definition at line 256 of file smartctl.cpp.

Function Documentation

void checksumwarning ( const char *  string)

Definition at line 1142 of file smartctl.cpp.

void failuretest ( failure_type  type,
int  returnvalue 
)

Definition at line 1119 of file smartctl.cpp.

static const char* get_protocol_info ( const smart_device dev)
static

Definition at line 1156 of file smartctl.cpp.

static std::string getvalidarglist ( int  opt)
static

Definition at line 185 of file smartctl.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 1302 of file smartctl.cpp.

static int main_worker ( int  argc,
char **  argv 
)
static

Definition at line 1218 of file smartctl.cpp.

static const char* parse_options ( int  argc,
char **  argv,
ata_print_options ataopts,
scsi_print_options scsiopts,
bool &  print_type_only 
)
static

Definition at line 266 of file smartctl.cpp.

void pout ( const char *  fmt,
  ... 
)

Definition at line 1095 of file smartctl.cpp.

static void printslogan ( )
static

Definition at line 61 of file smartctl.cpp.

static void printvalidarglistmessage ( int  opt)
static

Definition at line 238 of file smartctl.cpp.

void scan_devices ( const char *  type,
bool  with_open,
char **  argv 
)
static

Definition at line 1168 of file smartctl.cpp.

static void Usage ( )
static

Definition at line 75 of file smartctl.cpp.

static void UsageSummary ( )
static

Definition at line 66 of file smartctl.cpp.

Variable Documentation

checksum_err_mode_t checksum_err_mode = CHECKSUM_ERR_WARN
static

Definition at line 260 of file smartctl.cpp.

bool failuretest_conservative = false

Definition at line 1113 of file smartctl.cpp.

unsigned char failuretest_permissive = 0

Definition at line 1114 of file smartctl.cpp.

bool printing_is_off = false

Definition at line 59 of file smartctl.cpp.

bool printing_is_switchable = false

Definition at line 58 of file smartctl.cpp.

const char* smartctl_cpp_cvsid
Initial value:
= "$Id: smartctl.cpp 4080 2015-05-05 20:31:22Z chrfranke $"
CONFIG_H_CVSID SMARTCTL_H_CVSID
#define SMARTCTL_H_CVSID
Definition: smartctl.h:29

Definition at line 54 of file smartctl.cpp.