package losetup

import "github.com/containerd/containerd/snapshots/devmapper/losetup"

Index

Functions

func AttachLoopDevice

func AttachLoopDevice(imagePath string) (string, error)

AttachLoopDevice finds first available loop device and associates it with an image.

func DetachLoopDevice

func DetachLoopDevice(loopDevice ...string) error

DetachLoopDevice detaches loop devices

func FindAssociatedLoopDevices

func FindAssociatedLoopDevices(imagePath string) ([]string, error)

FindAssociatedLoopDevices returns a list of loop devices attached to a given image

func RemoveLoopDevicesAssociatedWithImage

func RemoveLoopDevicesAssociatedWithImage(imagePath string) error

RemoveLoopDevicesAssociatedWithImage detaches all loop devices attached to a given sparse image

Source Files

losetup.go

Version
v1.4.3
Published
Nov 30, 2020
Platform
linux/amd64
Imports
4 packages
Last checked
7 hours ago

Tools for package owners.