Documentation ¶
Index ¶
Constants ¶
View Source
const ( // INQ_REPLY_LEN = 96 INQ_REPLY_LEN = 20 SGInfoOk = 0x0 //no sense, host nor driver "noise" or error SGInfoOkMask = 0x1 //indicates whether some error or status field is non-zero SG_IO = 0x2285 //scsi generic ioctl command SCSI_INQUIRY = 0x12 // inquiry command SG_DXFER_FROM_DEV = -3 )
View Source
const (
NVME_ADMIN_IDENTIFY = 0x06
)
Variables ¶
View Source
var (
NVME_IOCTL_ADMIN_CMD = ioctl.Iowr('N', 0x41, unsafe.Sizeof(nvmePassthruCommand{}))
)
View Source
var (
NativeEndian binary.ByteOrder
)
A ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers.
View Source
var (
SERIALINQUIRY = []byte{0x12, 0x01, 0x80, 0x00, 0x60, 0x00}
)
Functions ¶
func GetSerialNumber ¶
func IsNVMEDevice ¶
Types ¶
type InquiryResponse ¶
type InquiryResponse [20]byte
type NVMeDevice ¶
type NVMeDevice struct {
Name string
}
func NewNVMeDevice ¶
func NewNVMeDevice(name string) *NVMeDevice
func (*NVMeDevice) SerialNumber ¶
func (d *NVMeDevice) SerialNumber() (string, error)
type SCSIDevice ¶
type SCSIDevice struct { Name string // contains filtered or unexported fields }
func NewSCSIDevice ¶
func NewSCSIDevice(devName string) *SCSIDevice
func (*SCSIDevice) SerialNumber ¶
func (d *SCSIDevice) SerialNumber() (string, error)
type SmartDevice ¶
Click to show internal directories.
Click to hide internal directories.