diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2022-12-17 11:59:24 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-12-22 10:11:08 +0100 |
| commit | 8482d3c1035095c89d112c75bfcc2e4095b486bf (patch) | |
| tree | f2cc2b32e55fd61cbcd03d1b27693fe7c972f07b /sys/linux | |
| parent | 412eecf40d514f89060844dc8631f60b80d7bfd2 (diff) | |
pkg/image: factor out from prog
Move image compression-related function to a separate package.
In preperation for subsequent changes that make decompression
more complex. Prog package is already large and complex.
Also makes running compression tests/benchmarks much faster.
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/init_images.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/linux/init_images.go b/sys/linux/init_images.go index 8b62455d2..c9a3035ef 100644 --- a/sys/linux/init_images.go +++ b/sys/linux/init_images.go @@ -8,6 +8,7 @@ import ( "fmt" "io" + "github.com/google/syzkaller/pkg/image" "github.com/google/syzkaller/prog" ) @@ -25,7 +26,7 @@ func (arch *arch) extractSyzMountImage(c *prog.Call) (io.Reader, error) { return nil, fmt.Errorf("an empty image") } buf := new(bytes.Buffer) - if err := prog.DecompressWriter(buf, data); err != nil { + if err := image.DecompressWriter(buf, data); err != nil { return nil, err } return buf, nil |
