Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromPath ¶
Create a backend.Storage from a path to an image file. Should pass a path to a file /tmp/foo.img The provided file must not exist at the time you call CreateFromPath()
func OpenFromPath ¶
Create a backend.Storage from a path to a device Should pass a path to a block device e.g. /dev/sda or a path to a file /tmp/foo.img The provided device/file must exist at the time you call OpenFromPath()
func OpenFromPathWithExclusive ¶ added in v1.9.4
OpenFromPathWithExclusive is like OpenFromPath but lets the caller choose whether a writable open uses O_EXCL. The exclusive flag is ignored for a read-only open. Callers that shell out to filesystem utilities (e.g. e2fsck/resize2fs) on the child partitions of a whole disk must open the disk non-exclusively: holding the parent disk O_EXCL makes the kernel reject O_EXCL opens of its partitions ("device is in use"). The returned backend records the path, unlike New.
Types ¶
This section is empty.