MSDN Home > MSDN Library > Storage Devices > Reference > I/O Requests for Mass Storage Drivers > Disk I/O Control Codes |
SMART_SEND_DRIVE_COMMANDOperationSends one of the following Self-Monitoring Analysis and Reporting Technology (SMART) commands to the device:
This IOCTL must be handled by drivers that support SMART. InputThe buffer at Irp->AssociatedIrp.SystemBuffer contains a SENDCMDINPARAMS structure that describes the command being sent to the device. The irDriveRegs.bCommandReg member must specify SMART_CMD. The irDriveRegs.bFeaturesReg member must specify ENABLE_SMART, DISABLE_SMART, ENABLE_DISABLE_AUTOSAVE, SAVE_ATTRIBUTE_VALUES, EXECUTE_OFFLINE_DIAG, or RETURN_SMART_STATUS. Parameters.DeviceIoControl.InputBufferLength specifies the size in, bytes, of the input buffer, which must be >= (sizeof(SENDCMDINPARAMS) 1). Parameters.DeviceIoControl.OutputBufferLength specifies the size, in bytes, of the output buffer, which must be >= (sizeof(SENDCMDOUTPARAMS) 1). If SMART status is being requested, the output buffer must be >= (sizeof(SENDCMDOUTPARAMS) 1 + sizeof(IDEREGS)). OutputThe driver returns the SENDCMDOUTPARAMS structure to the buffer at Irp->AssociatedIrp.SystemBuffer. If SMART status was requested and successfully received from the device, the driver includes the IDEREGS structure in the output buffer. I/O Status BlockWhen the driver sets the Status field to STATUS_SUCCESS, it sets the Information field is set to ((sizeof(SENDCMDOUTPARAMS) 1) + sizeof(IDEREGS)) for returning SMART status and to (sizeof(SENDCMDOUTPARAMS) 1) for all other commands. The driver should set the Status field to STATUS_INVALID_PARAMETER if an input parameter is incorrect or to STATUS_IO_DEVICE_ERROR if the device aborts a command it does not support. If Status is not STATUS_SUCCESS, the driver sets the Information field to zero. HeadersDefined in ntdddisk.h. Include ntdddisk.h. See Also |
Contact Us | E-Mail this Page | MSDN Flash Newsletter |
© 2003 Microsoft Corporation. All rights reserved. Terms of Use Privacy Statement Accessibility |