diff options
| author | Mark Johnston <markjdb@gmail.com> | 2019-03-04 22:30:02 -0500 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-12 14:30:21 +0100 |
| commit | b489e4987d1c181b1e4d16a8bbc32b97a90b9d8d (patch) | |
| tree | b277066cd8df0d65fe8331a67334936df41a7797 /pkg | |
| parent | 12365b99ce83b8a58433eaedbe412dff563ef8fb (diff) | |
pkg/build: don't export OS-specific functions
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/build/netbsd.go | 4 | ||||
| -rw-r--r-- | pkg/build/openbsd.go | 6 |
2 files changed, 5 insertions, 5 deletions
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. |
