Documentation ¶
Index ¶
Constants ¶
View Source
const ( LoopSetFd = 0x4C00 LoopClrFd = 0x4C01 LoopSetStatus64 = 0x4C04 LoopGetStatus64 = 0x4C05 LoopSetCapacity = 0x4C07 LoopCtlGetFree = 0x4C82 )
IOCTL consts; taken from /usr/include/linux/loop.h
View Source
const ( LoFlagsReadOnly = 1 LoFlagsAutoClear = 4 LoFlagsPartScan = 8 LoKeySize = 32 LoNameSize = 64 )
LOOP consts; taken from /usr/include/linux/loop.h
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 ¶
AttachLoopDevice attaches the given squashfs file to the next available loopback device. It returns an opened *os.File of the loop device created.
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.