Hyper.SuidHelper.Losetup (Hyper v0.1.0)

Copy Markdown View Source

Loop-device operations, via the setuid helper's losetup tool.

Summary

Functions

Attach path as a read-only loop-back block device.

Attach path as a read-write loop-back block device.

Detach the loop block device at dev.

Currently-attached loop devices as {device, backing_file} pairs.

Types

err()

@type err() :: Hyper.SuidHelper.err()

Functions

attach_ro(path)

@spec attach_ro(Path.t()) :: {:ok, Path.t()} | {:error, err()}

Attach path as a read-only loop-back block device.

attach_rw(path)

@spec attach_rw(Path.t()) :: {:ok, Path.t()} | {:error, err()}

Attach path as a read-write loop-back block device.

detach(dev)

@spec detach(Path.t()) :: :ok | {:error, err()}

Detach the loop block device at dev.

list()

@spec list() :: {:ok, [{Path.t(), Path.t()}]} | {:error, err()}

Currently-attached loop devices as {device, backing_file} pairs.