pkg: Build pkg/machine on FreeBSD

Add missing symbols for freebsd and freebsd/amd64.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
Doug Rabson 2022-05-08 12:56:59 +01:00
parent b806e9f360
commit 5ee3522f56
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,8 @@
//go:build freebsd
// +build freebsd
package machine
func getLocalTimeZone() (string, error) {
return "", nil
}

View File

@ -0,0 +1,13 @@
package qemu
import (
"os"
)
func getRuntimeDir() (string, error) {
tmpDir, ok := os.LookupEnv("TMPDIR")
if !ok {
tmpDir = "/tmp"
}
return tmpDir, nil
}

View File

@ -0,0 +1,18 @@
package qemu
var (
QemuCommand = "qemu-system-x86_64"
)
func (v *MachineVM) addArchOptions() []string {
opts := []string{"-machine", "q35,accel=hvf:tcg", "-cpu", "host"}
return opts
}
func (v *MachineVM) prepare() error {
return nil
}
func (v *MachineVM) archRemovalFiles() []string {
return []string{}
}