Documentation ¶
Index ¶
- Variables
- func CheckSense(i *Hdr, s *[]byte) error
- func ExecIoctl(inqCmdBlk []uint8, respBuf []byte, device string) error
- func GetDeviceSerial(device string) (string, error)
- func GetErrString(a, b byte) string
- func GetNOSVersion(device string) (string, error)
- func IsGroupScopedTarget(device string) bool
- func TestUnitReady(device string) error
- type Hdr
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StandardInquiry : StandardInquiry = []uint8{ 0x12, 0, 0, 0, 96, 0, } // Vpd80Inquiry : Vpd80Inquiry = []uint8{ 0x12, 1, 0x80, 0, 96, 0, } )
Functions ¶
func GetDeviceSerial ¶
GetDeviceSerial returns unit serial number of the device using vpd page 0x80
func TestUnitReady ¶
TestUnitReady to know if device is connected
Types ¶
type Hdr ¶
type Hdr struct { InterfaceID int32 DxferDirection int32 CmdLen uint8 MxSbLen uint8 IovecCount uint16 DxferLen uint32 Dxferp *byte Cmdp *uint8 Sbp *byte Timeout uint32 Flags uint32 PackID int32 UsrPtr *byte Status uint8 MaskedStatus uint8 MsgStatus uint8 SbLenWr uint8 HostStatus uint16 DriverStatus uint16 Resid int32 Duration uint32 Info uint32 // contains filtered or unexported fields }
Hdr is our version of sg_io_hdr_t that gets passed to the sg_io ioctl
Click to show internal directories.
Click to hide internal directories.