MCPcopy
hub / github.com/lima-vm/lima / MakeSparse

Method MakeSparse

pkg/imgutil/proxyimgutil/proxyimgutil.go:74–83  ·  view source on GitHub ↗
(ctx context.Context, f *os.File, offset int64)

Source from the content-addressed store, hash-verified

72}
73
74func (p *ImageDiskManager) MakeSparse(ctx context.Context, f *os.File, offset int64) error {
75 err := p.qemu.MakeSparse(ctx, f, offset)
76 if err == nil {
77 return nil
78 }
79 if errors.Is(err, exec.ErrNotFound) {
80 return p.native.MakeSparse(ctx, f, offset)
81 }
82 return err
83}

Callers

nothing calls this directly

Implementers 3

NativeImageUtilpkg/imgutil/nativeimgutil/nativeimguti
ImageDiskManagerpkg/imgutil/proxyimgutil/proxyimgutil.
QemuImageUtilpkg/qemuimgutil/qemuimgutil.go

Calls 1

MakeSparseMethod · 0.65

Tested by

no test coverage detected