Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SCSI commands used by this package SCSI_INQUIRY = 0x12 SCSI_MODE_SENSE_6 = 0x1a SCSI_READ_CAPACITY_10 = 0x25 SCSI_ATA_PASSTHRU_16 = 0x85 // Minimum length of standard INQUIRY response INQ_REPLY_LEN = 36 // SCSI-3 mode pages RIGID_DISK_DRIVE_GEOMETRY_PAGE = 0x04 // Mode page control field MPAGE_CONTROL_DEFAULT = 2 )
View Source
const ( SG_DXFER_NONE = -1 SG_DXFER_TO_DEV = -2 SG_DXFER_FROM_DEV = -3 SG_DXFER_TO_FROM_DEV = -4 SG_INFO_OK_MASK = 0x1 SG_INFO_OK = 0x0 SG_IO = 0x2285 // Timeout in milliseconds DEFAULT_TIMEOUT = 20000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
Top-level device interface. All supported device types must implement these methods.
func OpenSCSIAutodetect ¶
type InquiryResponse ¶
type InquiryResponse struct { Peripheral byte // peripheral qualifier, device type Version byte VendorIdent [8]byte ProductIdent [16]byte ProductRev [4]byte // contains filtered or unexported fields }
SCSI INQUIRY response
func (InquiryResponse) String ¶
func (inq InquiryResponse) String() string
type SATDevice ¶
type SATDevice struct {
SCSIDevice
}
SATDevice is a simple wrapper around an embedded SCSIDevice type, which handles sending ATA commands via SCSI pass-through (SCSI-ATA Translation).
type SCSIDevice ¶
type SCSIDevice struct { Name string // contains filtered or unexported fields }
TODO: Make a constructor function for this.
func (*SCSIDevice) Close ¶
func (d *SCSIDevice) Close() error
func (*SCSIDevice) Open ¶
func (d *SCSIDevice) Open() (err error)
func (*SCSIDevice) PrintSMART ¶
Regular SCSI (including SAS, but excluding SATA) SMART functions not yet fully implemented.
Click to show internal directories.
Click to hide internal directories.