From b489e4987d1c181b1e4d16a8bbc32b97a90b9d8d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 4 Mar 2019 22:30:02 -0500 Subject: pkg/build: don't export OS-specific functions --- pkg/build/netbsd.go | 4 ++-- pkg/build/openbsd.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg') diff --git a/pkg/build/netbsd.go b/pkg/build/netbsd.go index e23792975..91280577e 100644 --- a/pkg/build/netbsd.go +++ b/pkg/build/netbsd.go @@ -60,7 +60,7 @@ no options SVS return fmt.Errorf("failed to copy %v -> %v: %v", fullSrc, fullDst, err) } } - return CopyKernelToDisk(targetArch, vmType, outputDir, filepath.Join(compileDir, "netbsd")) + return ctx.copyKernelToDisk(targetArch, vmType, outputDir, filepath.Join(compileDir, "netbsd")) } func (ctx netbsd) clean(kernelDir, targetArch string) error { @@ -70,7 +70,7 @@ func (ctx netbsd) clean(kernelDir, targetArch string) error { } // Copy the compiled kernel to the qemu disk image using ssh. -func CopyKernelToDisk(targetArch, vmType, outputDir, kernel string) error { +func (ctx netbsd) copyKernelToDisk(targetArch, vmType, outputDir, kernel string) error { vmConfig := ` { "snapshot": false, diff --git a/pkg/build/openbsd.go b/pkg/build/openbsd.go index 0f40608db..24bd7a7d4 100644 --- a/pkg/build/openbsd.go +++ b/pkg/build/openbsd.go @@ -51,7 +51,7 @@ func (ctx openbsd) build(targetArch, vmType, kernelDir, outputDir, compiler, use } } if vmType == "gce" { - return CopyFilesToImage( + return ctx.copyFilesToImage( filepath.Join(userspaceDir, "overlay"), outputDir) } return nil @@ -71,7 +71,7 @@ func (ctx openbsd) make(kernelDir string, args ...string) error { return err } -// CopyFilesToImage populates the filesystem image in outputDir with +// copyFilesToImage populates the filesystem image in outputDir with // run-specific files. The kernel is copied as /bsd and if overlayDir // exists, its contents are copied into corresponding files in the // image. @@ -79,7 +79,7 @@ func (ctx openbsd) make(kernelDir string, args ...string) error { // Ideally a user space tool capable of understanding FFS should // interpret FFS inside the image file, but vnd(4) device would do in // a pinch. -func CopyFilesToImage(overlayDir, outputDir string) error { +func (ctx openbsd) copyFilesToImage(overlayDir, outputDir string) error { script := fmt.Sprintf(`set -eux OVERLAY="%s" # Cleanup in case something failed before. -- cgit mrf-deployment