From e60b110364688cf334ec68e073edf8d9cebc9fcb Mon Sep 17 00:00:00 2001 From: Kris Alder Date: Tue, 3 May 2022 11:05:34 -0700 Subject: pkg/build: refactor cuttlefish image code to embedFiles() Since most of the image mounting code is duplicated, we can instead extract it to an embedFiles() function that takes a callback. The Linux- or Android-specific code can be in the callback. --- pkg/build/linux_nolinux.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/build/linux_nolinux.go') diff --git a/pkg/build/linux_nolinux.go b/pkg/build/linux_nolinux.go index 0210627f5..03ea0da27 100644 --- a/pkg/build/linux_nolinux.go +++ b/pkg/build/linux_nolinux.go @@ -13,3 +13,7 @@ import ( func embedLinuxKernel(params Params, kernelPath string) error { return errors.New("building linux image is only supported on linux") } + +func embedFiles(params Params, callback func(mountDir string) error) error { + return errors.New("building linux image is only supported on linux") +} -- cgit mrf-deployment