loop

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/*
	 * IOCTL commands --- we will commandeer 0x4C ('L')
	 */
	LOOP_SET_CAPACITY = 0x4C07
	LOOP_CHANGE_FD    = 0x4C06
	LOOP_GET_STATUS64 = 0x4C05
	LOOP_SET_STATUS64 = 0x4C04
	LOOP_GET_STATUS   = 0x4C03
	LOOP_SET_STATUS   = 0x4C02
	LOOP_CLR_FD       = 0x4C01
	LOOP_SET_FD       = 0x4C00
	LO_NAME_SIZE      = 64
	LO_KEY_SIZE       = 32
	/* /dev/loop-control interface */
	LOOP_CTL_ADD      = 0x4C80
	LOOP_CTL_REMOVE   = 0x4C81
	LOOP_CTL_GET_FREE = 0x4C82
)

Variables

This section is empty.

Functions

func ClearFd

func ClearFd(fd uintptr) error

ClearFd clears the loop device associated with filedescriptor fd.

func ClearFdFile

func ClearFdFile(devicename string) error

ClearFdFile clears the loop device "devicename"

func CtlGetFree

func CtlGetFree(fd uintptr) (uintptr, error)

CtlGetFree finds a free loop device querying the loop control device pointed by fd. It returns the number of the free loop device /dev/loopX

func FindDevice

func FindDevice() (name string, err error)

FindDevice finds an unused loop device.

func SetFd

func SetFd(lfd, ffd uintptr) error

SetFd associates a loop device pointed by lfd with a regular file pointed by ffd.

func SetFdFiles

func SetFdFiles(devicename, filename string) error

SetFdFiles associates loop device "devicename" with regular file "filename"

Types

This section is empty.

Jump to

Keyboard shortcuts

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