package loopback

import "github.com/dotcloud/docker/pkg/loopback"

Index

Variables

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.

Source Files

attach_loopback.go loopback.go

Version
v23.0.10+incompatible
Published
Feb 16, 2024
Platform
linux/amd64
Imports
5 packages
Last checked
4 minutes ago

Tools for package owners.