aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/build/linux_nolinux.go
diff options
context:
space:
mode:
authorKris Alder <kalder@google.com>2022-05-03 11:05:34 -0700
committerDmitry Vyukov <dvyukov@google.com>2022-05-06 08:59:20 +0200
commite60b110364688cf334ec68e073edf8d9cebc9fcb (patch)
treee10026e4c1246c6b4d7206da4a7cd3acbff8343e /pkg/build/linux_nolinux.go
parentabda9b1a98d331fa672f556e33f18df2eed424bd (diff)
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.
Diffstat (limited to 'pkg/build/linux_nolinux.go')
-rw-r--r--pkg/build/linux_nolinux.go4
1 files changed, 4 insertions, 0 deletions
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")
+}