Documentation ¶
Index ¶
- Constants
- func ClearFd(fd uintptr) error
- func ClearFdFile(devicename string) error
- func CtlGetFree(fd uintptr) (uintptr, error)
- func FindDevice() (name string, err error)
- func New(source, target, fstype string, flags uintptr, data string) (mount.Mounter, error)
- func SetFd(lfd, ffd uintptr) error
- func SetFdFiles(devicename, filename string) error
- type Loop
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 ClearFdFile ¶
ClearFdFile clears the loop device "devicename"
func CtlGetFree ¶
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 ¶
FindDevice finds an unused loop device.
func SetFdFiles ¶
SetFdFiles associates loop device "devicename" with regular file "filename"
Types ¶
type Loop ¶
type Loop struct { Dev string Source string Dir string FStype string Flags uintptr Data string Mounted bool }
Loop implements mount.Mount
func (*Loop) Mount ¶
Mount mounts the provided source file, with type fstype, and flags and data options (which are usually 0 and ""), using any available loop device.
Click to show internal directories.
Click to hide internal directories.