loopback

package
v24.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAttachLoopbackDevice   = errors.New("loopback attach failed")
	ErrGetLoopbackBackingFile = errors.New("unable to get loopback backing file")
	ErrSetCapacity            = errors.New("unable set loopback capacity")
)

Loopback related errors

Functions

func AttachLoopDevice

func AttachLoopDevice(sparseName string) (loop *os.File, err error)

AttachLoopDevice attaches the given sparse file to the next available loopback device. It returns an opened *os.File.

func FindLoopDeviceFor

func FindLoopDeviceFor(file *os.File) *os.File

FindLoopDeviceFor returns a loopback device file for the specified file which is backing file of a loop back device.

func SetCapacity

func SetCapacity(file *os.File) error

SetCapacity reloads the size for the loopback device.

Types

This section is empty.

Jump to

Keyboard shortcuts

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