smartmontools SVN Rev 5640
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
os_win32.cpp File Reference
#include "config.h"
#include "atacmds.h"
#include "scsicmds.h"
#include "nvmecmds.h"
#include "utility.h"
#include "dev_interface.h"
#include "dev_ata_cmd_set.h"
#include "dev_areca.h"
#include "os_win32/wmiquery.h"
#include "os_win32/popen.h"
#include <errno.h>
#include <stddef.h>
#include <windows.h>
#include <ntddscsi.h>
#include "csmisas.h"
#include "aacraid.h"
Include dependency graph for os_win32.cpp:

Go to the source code of this file.

Classes

struct  ATA_PASS_THROUGH
 
struct  win10::_STORAGE_PROTOCOL_SPECIFIC_DATA
 
struct  _STORAGE_PROTOCOL_COMMAND
 
union  NVME_COMMAND_DWORD0
 
struct  NVME_COMMAND
 
struct  _GETVERSIONINPARAMS_EX
 
struct  _SENDCMDINPARAMS_EX
 
struct  _NVME_PASS_THROUGH_IOCTL
 
class  os_win32::win_smart_device
 
union  os_win32::STORAGE_DEVICE_DESCRIPTOR_DATA
 
class  os_win32::win_ata_device
 
class  os_win32::csmi_device
 
class  os_win32::csmi_ata_device
 
class  os_win32::win_csmi_device
 
class  os_win32::win_tw_cli_device
 
class  os_win32::win_scsi_device
 
struct  os_win32::SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER
 
class  os_win32::win_areca_scsi_device
 
class  os_win32::win_areca_ata_device
 
class  os_win32::win_aacraid_device
 
class  os_win32::win_nvme_device
 
class  os_win32::win10_nvme_device
 
struct  os_win32::STORAGE_PROTOCOL_SPECIFIC_QUERY_WITH_BUFFER
 
class  os_win32::win_smart_interface
 

Namespaces

namespace  win10
 
namespace  os_win32
 

Macros

#define WINVER   0x0502
 
#define _WIN32_WINNT   WINVER
 
#define assert(x)   /* */
 
#define _WIN32
 
#define SELECT_WIN_32_64(x32, x64)   (x32)
 
#define IOCTL_IDE_PASS_THROUGH    CTL_CODE(IOCTL_SCSI_BASE, 0x040A, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 
#define FILE_DEVICE_SCSI   0x001b
 
#define IOCTL_SCSI_MINIPORT_SMART_VERSION   ((FILE_DEVICE_SCSI << 16) + 0x0500)
 
#define IOCTL_SCSI_MINIPORT_IDENTIFY   ((FILE_DEVICE_SCSI << 16) + 0x0501)
 
#define IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS   ((FILE_DEVICE_SCSI << 16) + 0x0502)
 
#define IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS   ((FILE_DEVICE_SCSI << 16) + 0x0503)
 
#define IOCTL_SCSI_MINIPORT_ENABLE_SMART   ((FILE_DEVICE_SCSI << 16) + 0x0504)
 
#define IOCTL_SCSI_MINIPORT_DISABLE_SMART   ((FILE_DEVICE_SCSI << 16) + 0x0505)
 
#define IOCTL_SCSI_MINIPORT_RETURN_STATUS   ((FILE_DEVICE_SCSI << 16) + 0x0506)
 
#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE   ((FILE_DEVICE_SCSI << 16) + 0x0507)
 
#define IOCTL_SCSI_MINIPORT_SAVE_ATTRIBUTE_VALUES   ((FILE_DEVICE_SCSI << 16) + 0x0508)
 
#define IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS   ((FILE_DEVICE_SCSI << 16) + 0x0509)
 
#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTO_OFFLINE   ((FILE_DEVICE_SCSI << 16) + 0x050a)
 
#define IOCTL_SCSI_MINIPORT_READ_SMART_LOG   ((FILE_DEVICE_SCSI << 16) + 0x050b)
 
#define IOCTL_SCSI_MINIPORT_WRITE_SMART_LOG   ((FILE_DEVICE_SCSI << 16) + 0x050c)
 
#define IOCTL_STORAGE_PROTOCOL_COMMAND    CTL_CODE(IOCTL_STORAGE_BASE, 0x04f0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 
#define STORAGE_PROTOCOL_STRUCTURE_VERSION   1
 
#define STORAGE_PROTOCOL_COMMAND_FLAG_ADAPTER_REQUEST   0x80000000
 
#define STORAGE_PROTOCOL_SPECIFIC_NVME_ADMIN_COMMAND   0x01
 
#define STORAGE_PROTOCOL_COMMAND_LENGTH_NVME   0x40
 
#define SMART_VENDOR_3WARE   0x13C1
 
#define NVME_SIG_STR   "NvmeMini"
 
#define NVME_STORPORT_DRIVER   0xe000
 
#define NVME_PASS_THROUGH_SRB_IO_CODE    CTL_CODE(NVME_STORPORT_DRIVER, 0x0800, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define SMART_CYL_LOW   0x4F
 
#define SMART_CYL_HI   0xC2
 
#define SYNCOBJNAME   "Global\\SynIoctlMutex"
 
#define SYNCOBJNAME   "Global\\SynIoctlMutex"
 
#define ARECA_MAX_CTLR_NUM   16
 
#define aacraid_MAX_CTLR_NUM   16
 

Typedefs

typedef enum win10::_STORAGE_PROTOCOL_TYPE win10::STORAGE_PROTOCOL_TYPE
 
typedef enum win10::_STORAGE_PROTOCOL_NVME_DATA_TYPE win10::STORAGE_PROTOCOL_NVME_DATA_TYPE
 
typedef struct win10::_STORAGE_PROTOCOL_SPECIFIC_DATA win10::STORAGE_PROTOCOL_SPECIFIC_DATA
 
typedef struct _STORAGE_PROTOCOL_COMMAND STORAGE_PROTOCOL_COMMAND
 
typedef struct _GETVERSIONINPARAMS_EX GETVERSIONINPARAMS_EX
 
typedef struct _SENDCMDINPARAMS_EX SENDCMDINPARAMS_EX
 
typedef struct _NVME_PASS_THROUGH_IOCTL NVME_PASS_THROUGH_IOCTL
 

Enumerations

enum  win10::_STORAGE_PROTOCOL_TYPE {
  win10::ProtocolTypeUnknown = 0 , win10::ProtocolTypeScsi , win10::ProtocolTypeAta , win10::ProtocolTypeNvme ,
  win10::ProtocolTypeSd
}
 
enum  win10::_STORAGE_PROTOCOL_NVME_DATA_TYPE { win10::NVMeDataTypeUnknown = 0 , win10::NVMeDataTypeIdentify , win10::NVMeDataTypeLogPage , win10::NVMeDataTypeFeature }
 
enum  os_win32::win_dev_type {
  os_win32::DEV_UNKNOWN = 0 , os_win32::DEV_ATA , os_win32::DEV_SCSI , os_win32::DEV_SAT ,
  os_win32::DEV_USB , os_win32::DEV_NVME
}
 

Functions

 STATIC_ASSERT (SMART_GET_VERSION==0x074080)
 
 STATIC_ASSERT (SMART_SEND_DRIVE_COMMAND==0x07c084)
 
 STATIC_ASSERT (SMART_RCV_DRIVE_DATA==0x07c088)
 
 STATIC_ASSERT (sizeof(GETVERSIONINPARAMS)==24)
 
 STATIC_ASSERT (sizeof(SENDCMDINPARAMS)==32+1)
 
 STATIC_ASSERT (sizeof(SENDCMDOUTPARAMS)==16+1)
 
 STATIC_ASSERT (IOCTL_IDE_PASS_THROUGH==0x04d028)
 
 STATIC_ASSERT (sizeof(ATA_PASS_THROUGH)==12+1)
 
 STATIC_ASSERT (IOCTL_ATA_PASS_THROUGH==0x04d02c)
 
 STATIC_ASSERT (sizeof(ATA_PASS_THROUGH_EX)==SELECT_WIN_32_64(40, 48))
 
 STATIC_ASSERT (IOCTL_SCSI_PASS_THROUGH==0x04d004)
 
 STATIC_ASSERT (IOCTL_SCSI_PASS_THROUGH_DIRECT==0x04d014)
 
 STATIC_ASSERT (sizeof(SCSI_PASS_THROUGH)==SELECT_WIN_32_64(44, 56))
 
 STATIC_ASSERT (sizeof(SCSI_PASS_THROUGH_DIRECT)==SELECT_WIN_32_64(44, 56))
 
 STATIC_ASSERT (IOCTL_SCSI_MINIPORT==0x04d008)
 
 STATIC_ASSERT (IOCTL_SCSI_MINIPORT_SMART_VERSION==0x1b0500)
 
 STATIC_ASSERT (sizeof(SRB_IO_CONTROL)==28)
 
 STATIC_ASSERT (IOCTL_STORAGE_QUERY_PROPERTY==0x002d1400)
 
 STATIC_ASSERT (sizeof(STORAGE_DEVICE_DESCRIPTOR)==36+1+3)
 
 STATIC_ASSERT (sizeof(STORAGE_PROPERTY_QUERY)==8+1+3)
 
 win10::STATIC_ASSERT (sizeof(STORAGE_PROTOCOL_SPECIFIC_DATA)==40)
 
 STATIC_ASSERT (IOCTL_STORAGE_PREDICT_FAILURE==0x002d1100)
 
 STATIC_ASSERT (sizeof(STORAGE_PREDICT_FAILURE)==4+512)
 
 STATIC_ASSERT (IOCTL_STORAGE_PROTOCOL_COMMAND==0x002dd3c0)
 
 STATIC_ASSERT (offsetof(STORAGE_PROTOCOL_COMMAND, Command)==80)
 
 STATIC_ASSERT (sizeof(STORAGE_PROTOCOL_COMMAND)==84)
 
 STATIC_ASSERT (sizeof(NVME_COMMAND)==STORAGE_PROTOCOL_COMMAND_LENGTH_NVME)
 
 STATIC_ASSERT (offsetof(NVME_COMMAND, u.GENERAL.CDW10)==40)
 
 STATIC_ASSERT (sizeof(GETVERSIONINPARAMS_EX)==sizeof(GETVERSIONINPARAMS))
 
 STATIC_ASSERT (sizeof(SENDCMDINPARAMS_EX)==sizeof(SENDCMDINPARAMS))
 
 STATIC_ASSERT (NVME_PASS_THROUGH_SRB_IO_CODE==(int) 0xe0002000)
 
 STATIC_ASSERT (sizeof(NVME_PASS_THROUGH_IOCTL)==152+1)
 
 STATIC_ASSERT (sizeof(IOCTL_HEADER)==sizeof(SRB_IO_CONTROL))
 
 STATIC_ASSERT (sizeof(CSMI_SAS_DRIVER_INFO_BUFFER)==204)
 
 STATIC_ASSERT (sizeof(CSMI_SAS_PHY_INFO_BUFFER)==2080)
 
 STATIC_ASSERT (sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER)==168)
 
 STATIC_ASSERT (sizeof(SCSI_REQUEST_BLOCK)==SELECT_WIN_32_64(64, 88))
 
static int os_win32::is_permissive ()
 
static int os_win32::drive_letter (const char *s)
 
static const char * os_win32::skipdev (const char *s)
 
static int os_win32::sdxy_to_phydrive (const char(&xy)[2+1])
 
static void os_win32::copy_swapped (unsigned char *dest, const char *src, int destsize)
 
static void os_win32::print_ide_regs (const IDEREGS *r, int out)
 
static void os_win32::print_ide_regs_io (const IDEREGS *ri, const IDEREGS *ro)
 
static int os_win32::smart_get_version (HANDLE hdevice, GETVERSIONINPARAMS_EX *ata_version_ex=0)
 
static int os_win32::smart_ioctl (HANDLE hdevice, IDEREGS *regs, char *data, unsigned datasize, int port)
 
static int os_win32::ide_pass_through_ioctl (HANDLE hdevice, IDEREGS *regs, char *data, unsigned datasize)
 
static int os_win32::ata_pass_through_ioctl (HANDLE hdevice, IDEREGS *regs, IDEREGS *prev_regs, char *data, int datasize)
 
static int os_win32::ata_via_scsi_miniport_smart_ioctl (HANDLE hdevice, IDEREGS *regs, char *data, int datasize)
 
static int os_win32::ata_via_3ware_miniport_ioctl (HANDLE hdevice, IDEREGS *regs, char *data, int datasize, int port)
 
static int os_win32::update_3ware_devicemap_ioctl (HANDLE hdevice)
 
static int os_win32::storage_query_property_ioctl (HANDLE hdevice, STORAGE_DEVICE_DESCRIPTOR_DATA *data)
 
static int os_win32::storage_predict_failure_ioctl (HANDLE hdevice, char *data=0)
 
static int os_win32::get_identify_from_device_property (HANDLE hdevice, ata_identify_device *id)
 
static bool os_win32::get_serial_from_wmi (int drive, ata_identify_device *id)
 
static bool os_win32::get_usb_id (int phydrive, int logdrive, unsigned short &vendor_id, unsigned short &product_id)
 
static int os_win32::get_device_power_state (HANDLE hdevice)
 
static const char * os_win32::ata_get_def_options ()
 
static int os_win32::get_clipboard (char *data, int datasize)
 
static const char * os_win32::findstr (const char *str, const char *sub)
 
static long os_win32::scsi_pass_through_indirect (HANDLE h, SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER *sbd)
 
static long os_win32::scsi_pass_through_direct (HANDLE fd, UCHAR targetid, struct scsi_cmnd_io *iop)
 Areca RAID support.
 
static bool os_win32::is_wow64 ()
 
static bool os_win32::is_sat (const STORAGE_DEVICE_DESCRIPTOR_DATA *data)
 
static bool os_win32::is_intel_raid_volume (const STORAGE_DEVICE_DESCRIPTOR_DATA *data)
 
static win_dev_type os_win32::get_controller_type (HANDLE hdevice, bool admin, GETVERSIONINPARAMS_EX *ata_version_ex)
 
static win_dev_type os_win32::get_controller_type (const char *path, GETVERSIONINPARAMS_EX *ata_version_ex=0)
 
static win_dev_type os_win32::get_phy_drive_type (int drive, GETVERSIONINPARAMS_EX *ata_version_ex)
 
static win_dev_type os_win32::get_phy_drive_type (int drive)
 
static win_dev_type os_win32::get_log_drive_type (int drive)
 
static win_dev_type os_win32::get_dev_type (const char *name, int &phydrive, int &logdrive)
 
std::string get_exe_dir ()
 

Variables

unsigned char failuretest_permissive
 
const char * os_win32_cpp_cvsid = "$Id: os_win32.cpp 5615 2024-09-23 17:38:04Z chrfranke $"
 
const STORAGE_PROPERTY_ID win10::StorageAdapterProtocolSpecificProperty = (STORAGE_PROPERTY_ID)49
 
const STORAGE_PROPERTY_ID win10::StorageDeviceProtocolSpecificProperty = (STORAGE_PROPERTY_ID)50
 

Macro Definition Documentation

◆ _WIN32

#define _WIN32

Definition at line 54 of file os_win32.cpp.

◆ _WIN32_WINNT

#define _WIN32_WINNT   WINVER

Definition at line 19 of file os_win32.cpp.

◆ aacraid_MAX_CTLR_NUM

#define aacraid_MAX_CTLR_NUM   16

◆ ARECA_MAX_CTLR_NUM

#define ARECA_MAX_CTLR_NUM   16

◆ assert

#define assert (   x)    /* */

Definition at line 42 of file os_win32.cpp.

◆ FILE_DEVICE_SCSI

#define FILE_DEVICE_SCSI   0x001b

Definition at line 133 of file os_win32.cpp.

◆ IOCTL_IDE_PASS_THROUGH

#define IOCTL_IDE_PASS_THROUGH    CTL_CODE(IOCTL_SCSI_BASE, 0x040A, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

Definition at line 97 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_DISABLE_SMART

#define IOCTL_SCSI_MINIPORT_DISABLE_SMART   ((FILE_DEVICE_SCSI << 16) + 0x0505)

Definition at line 143 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTO_OFFLINE

#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTO_OFFLINE   ((FILE_DEVICE_SCSI << 16) + 0x050a)

Definition at line 148 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE

#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE   ((FILE_DEVICE_SCSI << 16) + 0x0507)

Definition at line 145 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_ENABLE_SMART

#define IOCTL_SCSI_MINIPORT_ENABLE_SMART   ((FILE_DEVICE_SCSI << 16) + 0x0504)

Definition at line 142 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS

#define IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS   ((FILE_DEVICE_SCSI << 16) + 0x0509)

Definition at line 147 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_IDENTIFY

#define IOCTL_SCSI_MINIPORT_IDENTIFY   ((FILE_DEVICE_SCSI << 16) + 0x0501)

Definition at line 139 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS

#define IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS   ((FILE_DEVICE_SCSI << 16) + 0x0502)

Definition at line 140 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_READ_SMART_LOG

#define IOCTL_SCSI_MINIPORT_READ_SMART_LOG   ((FILE_DEVICE_SCSI << 16) + 0x050b)

Definition at line 149 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS

#define IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS   ((FILE_DEVICE_SCSI << 16) + 0x0503)

Definition at line 141 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_RETURN_STATUS

#define IOCTL_SCSI_MINIPORT_RETURN_STATUS   ((FILE_DEVICE_SCSI << 16) + 0x0506)

Definition at line 144 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_SAVE_ATTRIBUTE_VALUES

#define IOCTL_SCSI_MINIPORT_SAVE_ATTRIBUTE_VALUES   ((FILE_DEVICE_SCSI << 16) + 0x0508)

Definition at line 146 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_SMART_VERSION

#define IOCTL_SCSI_MINIPORT_SMART_VERSION   ((FILE_DEVICE_SCSI << 16) + 0x0500)

Definition at line 138 of file os_win32.cpp.

◆ IOCTL_SCSI_MINIPORT_WRITE_SMART_LOG

#define IOCTL_SCSI_MINIPORT_WRITE_SMART_LOG   ((FILE_DEVICE_SCSI << 16) + 0x050c)

Definition at line 150 of file os_win32.cpp.

◆ IOCTL_STORAGE_PROTOCOL_COMMAND

#define IOCTL_STORAGE_PROTOCOL_COMMAND    CTL_CODE(IOCTL_STORAGE_BASE, 0x04f0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

Definition at line 214 of file os_win32.cpp.

◆ NVME_PASS_THROUGH_SRB_IO_CODE

#define NVME_PASS_THROUGH_SRB_IO_CODE    CTL_CODE(NVME_STORPORT_DRIVER, 0x0800, METHOD_BUFFERED, FILE_ANY_ACCESS)

Definition at line 330 of file os_win32.cpp.

◆ NVME_SIG_STR

#define NVME_SIG_STR   "NvmeMini"

Definition at line 327 of file os_win32.cpp.

◆ NVME_STORPORT_DRIVER

#define NVME_STORPORT_DRIVER   0xe000

Definition at line 328 of file os_win32.cpp.

◆ SELECT_WIN_32_64

#define SELECT_WIN_32_64 (   x32,
  x64 
)    (x32)

Definition at line 64 of file os_win32.cpp.

◆ SMART_CYL_HI

#define SMART_CYL_HI   0xC2

Definition at line 484 of file os_win32.cpp.

◆ SMART_CYL_LOW

#define SMART_CYL_LOW   0x4F

Definition at line 483 of file os_win32.cpp.

◆ SMART_VENDOR_3WARE

#define SMART_VENDOR_3WARE   0x13C1

Definition at line 291 of file os_win32.cpp.

◆ STORAGE_PROTOCOL_COMMAND_FLAG_ADAPTER_REQUEST

#define STORAGE_PROTOCOL_COMMAND_FLAG_ADAPTER_REQUEST   0x80000000

Definition at line 245 of file os_win32.cpp.

◆ STORAGE_PROTOCOL_COMMAND_LENGTH_NVME

#define STORAGE_PROTOCOL_COMMAND_LENGTH_NVME   0x40

Definition at line 247 of file os_win32.cpp.

◆ STORAGE_PROTOCOL_SPECIFIC_NVME_ADMIN_COMMAND

#define STORAGE_PROTOCOL_SPECIFIC_NVME_ADMIN_COMMAND   0x01

Definition at line 246 of file os_win32.cpp.

◆ STORAGE_PROTOCOL_STRUCTURE_VERSION

#define STORAGE_PROTOCOL_STRUCTURE_VERSION   1

Definition at line 221 of file os_win32.cpp.

◆ SYNCOBJNAME [1/2]

#define SYNCOBJNAME   "Global\\SynIoctlMutex"

◆ SYNCOBJNAME [2/2]

#define SYNCOBJNAME   "Global\\SynIoctlMutex"

◆ WINVER

#define WINVER   0x0502

Definition at line 18 of file os_win32.cpp.

Typedef Documentation

◆ GETVERSIONINPARAMS_EX

◆ NVME_PASS_THROUGH_IOCTL

◆ SENDCMDINPARAMS_EX

◆ STORAGE_PROTOCOL_COMMAND

Function Documentation

◆ get_exe_dir()

std::string get_exe_dir ( )

Definition at line 4841 of file os_win32.cpp.

◆ STATIC_ASSERT() [1/36]

STATIC_ASSERT ( IOCTL_ATA_PASS_THROUGH  = =0x04d02c)

◆ STATIC_ASSERT() [2/36]

STATIC_ASSERT ( IOCTL_IDE_PASS_THROUGH  = =0x04d028)

◆ STATIC_ASSERT() [3/36]

STATIC_ASSERT ( IOCTL_SCSI_MINIPORT  = =0x04d008)

◆ STATIC_ASSERT() [4/36]

STATIC_ASSERT ( IOCTL_SCSI_MINIPORT_SMART_VERSION  = =0x1b0500)

◆ STATIC_ASSERT() [5/36]

STATIC_ASSERT ( IOCTL_SCSI_PASS_THROUGH  = =0x04d004)

◆ STATIC_ASSERT() [6/36]

STATIC_ASSERT ( IOCTL_SCSI_PASS_THROUGH_DIRECT  = =0x04d014)

◆ STATIC_ASSERT() [7/36]

STATIC_ASSERT ( IOCTL_STORAGE_PREDICT_FAILURE  = =0x002d1100)

◆ STATIC_ASSERT() [8/36]

STATIC_ASSERT ( IOCTL_STORAGE_PROTOCOL_COMMAND  = =0x002dd3c0)

◆ STATIC_ASSERT() [9/36]

STATIC_ASSERT ( IOCTL_STORAGE_QUERY_PROPERTY  = =0x002d1400)

◆ STATIC_ASSERT() [10/36]

STATIC_ASSERT ( NVME_PASS_THROUGH_SRB_IO_CODE  = =(int) 0xe0002000)

◆ STATIC_ASSERT() [11/36]

STATIC_ASSERT ( offsetof(NVME_COMMAND, u.GENERAL.CDW10)  = =40)

◆ STATIC_ASSERT() [12/36]

STATIC_ASSERT ( offsetof(STORAGE_PROTOCOL_COMMAND, Command)  = =80)

◆ STATIC_ASSERT() [13/36]

STATIC_ASSERT ( sizeof(ATA_PASS_THROUGH = =12+1)

◆ STATIC_ASSERT() [14/36]

STATIC_ASSERT ( sizeof(ATA_PASS_THROUGH_EX)  = =SELECT_WIN_32_64(40, 48))

◆ STATIC_ASSERT() [15/36]

STATIC_ASSERT ( sizeof(CSMI_SAS_DRIVER_INFO_BUFFER = =204)

◆ STATIC_ASSERT() [16/36]

STATIC_ASSERT ( sizeof(CSMI_SAS_PHY_INFO_BUFFER = =2080)

◆ STATIC_ASSERT() [17/36]

STATIC_ASSERT ( sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER = =168)

◆ STATIC_ASSERT() [18/36]

STATIC_ASSERT ( sizeof(GETVERSIONINPARAMS)  = =24)

◆ STATIC_ASSERT() [19/36]

STATIC_ASSERT ( sizeof(GETVERSIONINPARAMS_EX = =sizeof(GETVERSIONINPARAMS))

◆ STATIC_ASSERT() [20/36]

STATIC_ASSERT ( sizeof(IOCTL_HEADER)  = =sizeof(SRB_IO_CONTROL))

◆ STATIC_ASSERT() [21/36]

STATIC_ASSERT ( sizeof(NVME_COMMAND = =STORAGE_PROTOCOL_COMMAND_LENGTH_NVME)

◆ STATIC_ASSERT() [22/36]

STATIC_ASSERT ( sizeof(NVME_PASS_THROUGH_IOCTL = =152+1)

◆ STATIC_ASSERT() [23/36]

STATIC_ASSERT ( sizeof(SCSI_PASS_THROUGH)  = =SELECT_WIN_32_64(44, 56))

◆ STATIC_ASSERT() [24/36]

STATIC_ASSERT ( sizeof(SCSI_PASS_THROUGH_DIRECT)  = =SELECT_WIN_32_64(44, 56))

◆ STATIC_ASSERT() [25/36]

STATIC_ASSERT ( sizeof(SCSI_REQUEST_BLOCK)  = =SELECT_WIN_32_64(64, 88))

◆ STATIC_ASSERT() [26/36]

STATIC_ASSERT ( sizeof(SENDCMDINPARAMS)  = =32+1)

◆ STATIC_ASSERT() [27/36]

STATIC_ASSERT ( sizeof(SENDCMDINPARAMS_EX = =sizeof(SENDCMDINPARAMS))

◆ STATIC_ASSERT() [28/36]

STATIC_ASSERT ( sizeof(SENDCMDOUTPARAMS)  = =16+1)

◆ STATIC_ASSERT() [29/36]

STATIC_ASSERT ( sizeof(SRB_IO_CONTROL)  = =28)

◆ STATIC_ASSERT() [30/36]

STATIC_ASSERT ( sizeof(STORAGE_DEVICE_DESCRIPTOR)  = =36+1+3)

◆ STATIC_ASSERT() [31/36]

STATIC_ASSERT ( sizeof(STORAGE_PREDICT_FAILURE)  = =4+512)

◆ STATIC_ASSERT() [32/36]

STATIC_ASSERT ( sizeof(STORAGE_PROPERTY_QUERY)  = =8+1+3)

◆ STATIC_ASSERT() [33/36]

STATIC_ASSERT ( sizeof(STORAGE_PROTOCOL_COMMAND = =84)

◆ STATIC_ASSERT() [34/36]

STATIC_ASSERT ( SMART_GET_VERSION  = =0x074080)

◆ STATIC_ASSERT() [35/36]

STATIC_ASSERT ( SMART_RCV_DRIVE_DATA  = =0x07c088)

◆ STATIC_ASSERT() [36/36]

STATIC_ASSERT ( SMART_SEND_DRIVE_COMMAND  = =0x07c084)

Variable Documentation

◆ failuretest_permissive

unsigned char failuretest_permissive
extern

Definition at line 1457 of file smartctl.cpp.

◆ os_win32_cpp_cvsid

const char* os_win32_cpp_cvsid = "$Id: os_win32.cpp 5615 2024-09-23 17:38:04Z chrfranke $"

Definition at line 76 of file os_win32.cpp.