sgio

package
v4.5.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 CheckSense

func CheckSense(i *Hdr, s *[]byte) error

CheckSense : checks the sense error code

func ExecIoctl

func ExecIoctl(inqCmdBlk []uint8, respBuf []byte, device string) error

ExecIoctl :

func GetDeviceSerial

func GetDeviceSerial(device string) (string, error)

GetDeviceSerial returns unit serial number of the device using vpd page 0x80

func GetErrString

func GetErrString(a, b byte) string

GetErrString get the error string

func GetNOSVersion

func GetNOSVersion(device string) (string, error)

GetNOSVersion :

func IsGroupScopedTarget

func IsGroupScopedTarget(device string) bool

IsGroupScopedTarget :

func TestUnitReady

func TestUnitReady(device string) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL