qemuio

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discard

func Discard(path string, format qemuimg.Format, off, len int64, unmap bool) error

Discard unmap number of bytes at specified offset. Allocated cluster are deaallocated and replaced with zero clusters.

func Write

func Write(path string, format qemuimg.Format, off, len int64, pattern byte) error

Write writes a number of bytes at a specified offset, allocating all clusters in specified range.

func Zero

func Zero(path string, format qemuimg.Format, off, len int64) error

Zero writes zeros at a specified offset. The behavior depens on qcow2 version; In qcow2 v3, allocate zero clusters, marming entire cluster as zero. In qcow2 v2, if the cluster are unallocated and there is no backing file, do nothing. Otherwise allocate clusters and write actual zeros.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL