ioctl

package module
v0.0.0-...-6be9cce Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2015 License: MIT Imports: 2 Imported by: 38

README

go-ioctl

Documentation GoDoc

Documentation

Index

Constants

View Source
const (
	IOC_NONE  = 0x0
	IOC_WRITE = 0x1
	IOC_READ  = 0x2

	IOC_NRBITS   = 8
	IOC_TYPEBITS = 8

	IOC_SIZEBITS = 14
	IOC_DIRBITS  = 2

	IOC_NRSHIFT   = 0
	IOC_TYPESHIFT = IOC_NRSHIFT + IOC_NRBITS
	IOC_SIZESHIFT = IOC_TYPESHIFT + IOC_TYPEBITS
	IOC_DIRSHIFT  = IOC_SIZESHIFT + IOC_SIZEBITS

	IOC_NRMASK   = ((1 << IOC_NRBITS) - 1)
	IOC_TYPEMASK = ((1 << IOC_TYPEBITS) - 1)
	IOC_SIZEMASK = ((1 << IOC_SIZEBITS) - 1)
	IOC_DIRMASK  = ((1 << IOC_DIRBITS) - 1)
)

Generic ioctl constants

View Source
const (
	IOC_IN        = IOC_WRITE << IOC_DIRSHIFT
	IOC_OUT       = IOC_READ << IOC_DIRSHIFT
	IOC_INOUT     = (IOC_WRITE | IOC_READ) << IOC_DIRSHIFT
	IOCSIZE_MASK  = IOC_SIZEMASK << IOC_SIZESHIFT
	IOCSIZE_SHIFT = IOC_SIZESHIFT
)

Some useful additional ioctl constanst

Variables

This section is empty.

Functions

func BlkPg

func BlkPg(fd, data uintptr) error

BlkPg send blkpg ioctl to fd

func BlkRRPart

func BlkRRPart(fd uintptr) error

BlkPart send blkpart ioctl to fd

func Fifreeze

func Fifreeze(fd, data uintptr) error

Fifreeze send fifreeze ioctl to fd

func Fithaw

func Fithaw(fd, data uintptr) error

Fithaw send fithaw ioctl to fd

func Fitrim

func Fitrim(fd, data uintptr) error

Fitrim send fitrim ioctl to fd

func IO

func IO(t, nr uintptr) uintptr

IO generate IO

func IOC

func IOC(dir, t, nr, size uintptr) uintptr

IOC generate IOC

func IOCTL

func IOCTL(fd, name, data uintptr) error

IOCTL send ioctl

func IOR

func IOR(t, nr, size uintptr) uintptr

IOR generate IOR

func IOW

func IOW(t, nr, size uintptr) uintptr

IOW generate IOW

func IOWR

func IOWR(t, nr, size uintptr) uintptr

IOWR generate IOWR

Types

type FsTrimRange

type FsTrimRange struct {
	Start     uint64
	Length    uint64
	MinLength uint64
}

Jump to

Keyboard shortcuts

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