smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
Public Member Functions | Protected Member Functions | Private Member Functions
os_linux::linux_smart_interface Class Reference

Linux interface. More...

Collaboration diagram for os_linux::linux_smart_interface:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual std::string get_os_version_str ()
 Return info string about build host and/or OS version.
virtual std::string get_app_examples (const char *appname)
 Return example string for program 'appname'.
virtual bool scan_smart_devices (smart_device_list &devlist, const char *type, const char *pattern=0)
 Fill 'devlist' with devices of some 'type' with device names specified by some optional 'pattern'.

Protected Member Functions

virtual ata_deviceget_ata_device (const char *name, const char *type)
 Return standard ATA device.
virtual scsi_deviceget_scsi_device (const char *name, const char *type)
 Return standard SCSI device.
virtual smart_deviceautodetect_smart_device (const char *name)
 Autodetect device if no device type specified.
virtual smart_deviceget_custom_smart_device (const char *name, const char *type)
 Return device for platform specific 'type'.
virtual std::string get_valid_custom_dev_types_str ()
 Return valid 'type' args accepted by above.

Private Member Functions

bool get_dev_list (smart_device_list &devlist, const char *pattern, bool scan_ata, bool scan_scsi, const char *req_type, bool autodetect)
bool get_dev_megasas (smart_device_list &devlist)
smart_devicemissing_option (const char *opt)
int megasas_dcmd_cmd (int bus_no, uint32_t opcode, void *buf, size_t bufsize, uint8_t *mbox, size_t mboxlen, uint8_t *statusp)
int megasas_pd_add_list (int bus_no, smart_device_list &devlist)

Detailed Description

Linux interface.

Definition at line 2629 of file os_linux.cpp.


Member Function Documentation

smart_device * os_linux::linux_smart_interface::autodetect_smart_device ( const char *  name) [protected, virtual]

Autodetect device if no device type specified.

Implements smart_interface.

Definition at line 2993 of file os_linux.cpp.

std::string os_linux::linux_smart_interface::get_app_examples ( const char *  appname) [virtual]

Return example string for program 'appname'.

Default implementation returns empty string. For the migration of print_smartctl_examples(), function is allowed to print examples to stdout. TODO: Remove this hack.

Reimplemented from smart_interface.

Definition at line 2670 of file os_linux.cpp.

ata_device * os_linux::linux_smart_interface::get_ata_device ( const char *  name,
const char *  type 
) [protected, virtual]

Return standard ATA device.

Implements smart_interface.

Definition at line 2868 of file os_linux.cpp.

smart_device * os_linux::linux_smart_interface::get_custom_smart_device ( const char *  name,
const char *  type 
) [protected, virtual]

Return device for platform specific 'type'.

Default implementation returns 0.

Reimplemented from smart_interface.

Definition at line 3074 of file os_linux.cpp.

bool os_linux::linux_smart_interface::get_dev_list ( smart_device_list devlist,
const char *  pattern,
bool  scan_ata,
bool  scan_scsi,
const char *  req_type,
bool  autodetect 
) [private]

Definition at line 2680 of file os_linux.cpp.

bool os_linux::linux_smart_interface::get_dev_megasas ( smart_device_list devlist) [private]

Definition at line 2777 of file os_linux.cpp.

std::string os_linux::linux_smart_interface::get_os_version_str ( ) [virtual]

Return info string about build host and/or OS version.

Default implementation returns SMARTMONTOOLS_BUILD_HOST.

Reimplemented from smart_interface.

Definition at line 2661 of file os_linux.cpp.

scsi_device * os_linux::linux_smart_interface::get_scsi_device ( const char *  name,
const char *  type 
) [protected, virtual]

Return standard SCSI device.

Implements smart_interface.

Definition at line 2873 of file os_linux.cpp.

std::string os_linux::linux_smart_interface::get_valid_custom_dev_types_str ( ) [protected, virtual]

Return valid 'type' args accepted by above.

This is called in get_valid_dev_types_str(). Default implementation returns empty string.

Reimplemented from smart_interface.

Definition at line 3175 of file os_linux.cpp.

int os_linux::linux_smart_interface::megasas_dcmd_cmd ( int  bus_no,
uint32_t  opcode,
void *  buf,
size_t  bufsize,
uint8_t *  mbox,
size_t  mboxlen,
uint8_t *  statusp 
) [private]

Definition at line 2885 of file os_linux.cpp.

int os_linux::linux_smart_interface::megasas_pd_add_list ( int  bus_no,
smart_device_list devlist 
) [private]

Definition at line 2941 of file os_linux.cpp.

smart_device * os_linux::linux_smart_interface::missing_option ( const char *  opt) [private]

Definition at line 2878 of file os_linux.cpp.

bool os_linux::linux_smart_interface::scan_smart_devices ( smart_device_list devlist,
const char *  type,
const char *  pattern = 0 
) [virtual]

Fill 'devlist' with devices of some 'type' with device names specified by some optional 'pattern'.

Return false on error.

Implements smart_interface.

Definition at line 2831 of file os_linux.cpp.


The documentation for this class was generated from the following file: