nvme

package
v0.0.0-...-b56b9df Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// cf. NVM Express Base Specification 2.0c , section 5: Admin Command Set
	NVME_ADMIN_GET_LOG_PAGE uint8 = 0x02
	NVME_ADMIN_IDENTIFY     uint8 = 0x06
)

Variables

View Source
var (
	// Defined in <linux/nvme_ioctl.h>
	NVME_IOCTL_ADMIN_CMD = ioctl.Iowr('N', 0x41, unsafe.Sizeof(nvmePassthruCommand{}))
)
View Source
var (
	NativeEndian binary.ByteOrder
)

Functions

This section is empty.

Types

type NVMeController

type NVMeController struct {
	VendorID        uint16
	ModelNumber     string
	SerialNumber    string
	FirmwareVersion string
	OUI             uint32 // IEEE OUI identifier
	MaxDataXferSize uint
}

NVMeController encapsulates the attributes of an NVMe controller.

func (*NVMeController) Print

func (c *NVMeController) Print(w io.Writer)

Print outputs the attributes of an NVMe controller in a pretty-print style.

type NVMeDevice

type NVMeDevice struct {
	Name string
	// contains filtered or unexported fields
}

func NewNVMeDevice

func NewNVMeDevice(name string) *NVMeDevice

func (*NVMeDevice) Close

func (d *NVMeDevice) Close() error

func (*NVMeDevice) IdentifyController

func (d *NVMeDevice) IdentifyController(w io.Writer) (NVMeController, error)

func (*NVMeDevice) IdentifyNamespace

func (d *NVMeDevice) IdentifyNamespace(w io.Writer, namespace uint32) error

func (*NVMeDevice) Open

func (d *NVMeDevice) Open() (err error)

func (*NVMeDevice) PrintSMART

func (d *NVMeDevice) PrintSMART(w io.Writer) error

Jump to

Keyboard shortcuts

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