|
smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
|
#include "config.h"#include <errno.h>#include <fcntl.h>#include <glob.h>#include <scsi/scsi.h>#include <scsi/scsi_ioctl.h>#include <scsi/sg.h>#include <stdlib.h>#include <string.h>#include <sys/ioctl.h>#include <sys/stat.h>#include <sys/utsname.h>#include <unistd.h>#include <stddef.h>#include <sys/uio.h>#include <sys/types.h>#include <dirent.h>#include <sys/sysmacros.h>#include "int64.h"#include "atacmds.h"#include "os_linux.h"#include "scsicmds.h"#include "utility.h"#include "cciss.h"#include "megaraid.h"#include "dev_interface.h"#include "dev_ata_cmd_set.h"#include "dev_areca.h"
Go to the source code of this file.
Classes | |
| class | os_linux::linux_smart_device |
| Shared open/close routines. More... | |
| class | os_linux::linux_ata_device |
| Linux ATA support. More... | |
| struct | os_linux::linux_ioctl_send_command |
| class | os_linux::linux_scsi_device |
| Standard SCSI support. More... | |
| class | os_linux::linux_megaraid_device |
| LSI MegaRAID support. More... | |
| class | os_linux::linux_escalade_device |
| CCISS RAID support. More... | |
| class | os_linux::linux_areca_ata_device |
| Areca RAID support. More... | |
| class | os_linux::linux_areca_scsi_device |
| class | os_linux::linux_marvell_device |
| Marvell support. More... | |
| class | os_linux::linux_highpoint_device |
| Highpoint RAID support. More... | |
| class | os_linux::linux_smart_interface |
| Linux interface. More... | |
Namespaces | |
| namespace | os_linux |
Defines | |
| #define | ENOTSUP ENOSYS |
| #define | ARGUSED(x) ((void)(x)) |
| #define | BUFFER_LENGTH (4+512) |
| #define | MAX_DXFER_LEN 1024 |
| #define | SEND_IOCTL_RESP_SENSE_LEN 16 |
| #define | SG_IO_RESP_SENSE_LEN 64 |
| #define | LSCSI_DRIVER_MASK 0xf |
| #define | LSCSI_DRIVER_SENSE 0x8 |
| #define | LSCSI_DID_ERROR 0x7 |
| #define | LSCSI_DRIVER_TIMEOUT 0x6 |
| #define | LSCSI_DID_TIME_OUT 0x3 |
| #define | LSCSI_DID_BUS_BUSY 0x2 |
| #define | LSCSI_DID_NO_CONNECT 0x1 |
| #define | SCSI_IOCTL_SEND_COMMAND 1 |
| #define | SG_IO_PRESENT_UNKNOWN 0 |
| #define | SG_IO_PRESENT_YES 1 |
| #define | SG_IO_PRESENT_NO 2 |
| #define | MAJOR_STRING_LENGTH 3 |
| #define | DEVICE_STRING_LENGTH 32 |
| #define | NODE_STRING_LENGTH 16 |
| #define | BUFFER_LEN_678K ( sizeof(TW_Ioctl) ) |
| #define | BUFFER_LEN_678K_CHAR ( sizeof(TW_New_Ioctl)+512-1 ) |
| #define | BUFFER_LEN_9000 ( sizeof(TW_Ioctl_Buf_Apache)+512-1 ) |
| #define | TW_IOCTL_BUFFER_SIZE ( MAX(MAX(BUFFER_LEN_678K, BUFFER_LEN_9000), BUFFER_LEN_678K_CHAR) ) |
| #define | STRANGE_BUFFER_LENGTH (4+512*0xf8) |
Functions | |
| static int | os_linux::sg_io_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report, int unknown) |
| static int | os_linux::sisc_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report) |
| static int | os_linux::do_normal_scsi_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report) |
| static int | os_linux::setup_3ware_nodes (const char *nodename, const char *driver_name) |
| static int | os_linux::find_areca_in_proc () |
| static bool | os_linux::read_id (const std::string &path, unsigned short &id) |
| static bool | os_linux::get_usb_id (const char *name, unsigned short &vendor_id, unsigned short &product_id, unsigned short &version) |
| static unsigned | os_linux::get_kernel_release () |
Variables | |
| const char * | os_linux_cpp_cvsid |
| unsigned char | failuretest_permissive |
| static const char | os_linux::smartctl_examples [] = " on Areca RAID controller)\n" |
| static int | os_linux::sg_io_state = SG_IO_PRESENT_UNKNOWN |
| #define ARGUSED | ( | x | ) | ((void)(x)) |
Definition at line 92 of file os_linux.cpp.
| #define BUFFER_LEN_678K ( sizeof(TW_Ioctl) ) |
Definition at line 1450 of file os_linux.cpp.
| #define BUFFER_LEN_678K_CHAR ( sizeof(TW_New_Ioctl)+512-1 ) |
Definition at line 1451 of file os_linux.cpp.
| #define BUFFER_LEN_9000 ( sizeof(TW_Ioctl_Buf_Apache)+512-1 ) |
Definition at line 1452 of file os_linux.cpp.
| #define BUFFER_LENGTH (4+512) |
Definition at line 248 of file os_linux.cpp.
| #define DEVICE_STRING_LENGTH 32 |
Definition at line 1258 of file os_linux.cpp.
| #define ENOTSUP ENOSYS |
Definition at line 89 of file os_linux.cpp.
| #define LSCSI_DID_BUS_BUSY 0x2 |
Definition at line 498 of file os_linux.cpp.
| #define LSCSI_DID_ERROR 0x7 |
Definition at line 495 of file os_linux.cpp.
| #define LSCSI_DID_NO_CONNECT 0x1 |
Definition at line 499 of file os_linux.cpp.
| #define LSCSI_DID_TIME_OUT 0x3 |
Definition at line 497 of file os_linux.cpp.
| #define LSCSI_DRIVER_MASK 0xf |
Definition at line 493 of file os_linux.cpp.
| #define LSCSI_DRIVER_SENSE 0x8 |
Definition at line 494 of file os_linux.cpp.
| #define LSCSI_DRIVER_TIMEOUT 0x6 |
Definition at line 496 of file os_linux.cpp.
| #define MAJOR_STRING_LENGTH 3 |
Definition at line 1257 of file os_linux.cpp.
| #define MAX_DXFER_LEN 1024 |
Definition at line 490 of file os_linux.cpp.
| #define NODE_STRING_LENGTH 16 |
Definition at line 1259 of file os_linux.cpp.
| #define SCSI_IOCTL_SEND_COMMAND 1 |
Definition at line 502 of file os_linux.cpp.
| #define SEND_IOCTL_RESP_SENSE_LEN 16 |
Definition at line 491 of file os_linux.cpp.
| #define SG_IO_PRESENT_NO 2 |
Definition at line 507 of file os_linux.cpp.
| #define SG_IO_PRESENT_UNKNOWN 0 |
Definition at line 505 of file os_linux.cpp.
| #define SG_IO_PRESENT_YES 1 |
Definition at line 506 of file os_linux.cpp.
| #define SG_IO_RESP_SENSE_LEN 64 |
Definition at line 492 of file os_linux.cpp.
| #define STRANGE_BUFFER_LENGTH (4+512*0xf8) |
Definition at line 2042 of file os_linux.cpp.
| #define TW_IOCTL_BUFFER_SIZE ( MAX(MAX(BUFFER_LEN_678K, BUFFER_LEN_9000), BUFFER_LEN_678K_CHAR) ) |
Definition at line 1453 of file os_linux.cpp.
| unsigned char failuretest_permissive |
Definition at line 1097 of file smartctl.cpp.
| const char* os_linux_cpp_cvsid |
"$Id: os_linux.cpp 3738 2012-12-17 12:01:35Z samm2 $" OS_LINUX_H_CVSID
Definition at line 94 of file os_linux.cpp.
1.7.4