package loopback
import "github.com/docker/cli/components/engine/pkg/loopback"
Index ¶
- Constants
- Variables
- func AttachLoopDevice(sparseName string) (loop *os.File, err error)
- func FindLoopDeviceFor(file *os.File) *os.File
- func SetCapacity(file *os.File) error
Constants ¶
const ( LoopSetFd = C.LOOP_SET_FD LoopCtlGetFree = C.LOOP_CTL_GET_FREE LoopGetStatus64 = C.LOOP_GET_STATUS64 LoopSetStatus64 = C.LOOP_SET_STATUS64 LoopClrFd = C.LOOP_CLR_FD LoopSetCapacity = C.LOOP_SET_CAPACITY )
IOCTL consts
const ( LoFlagsAutoClear = C.LO_FLAGS_AUTOCLEAR LoFlagsReadOnly = C.LO_FLAGS_READ_ONLY LoFlagsPartScan = C.LO_FLAGS_PARTSCAN LoKeySize = C.LO_KEY_SIZE LoNameSize = C.LO_NAME_SIZE )
LOOP consts.
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 ¶
AttachLoopDevice attaches the given sparse file to the next available loopback device. It returns an opened *os.File.
func FindLoopDeviceFor ¶
FindLoopDeviceFor returns a loopback device file for the specified file which is backing file of a loop back device.
func SetCapacity ¶
SetCapacity reloads the size for the loopback device.
Source Files ¶
attach_loopback.go ioctl.go loop_wrapper.go loopback.go
- Version
- v17.10.0-ce-rc1+incompatible
- Published
- Oct 4, 2017
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 2 hours ago –
Tools for package owners.