1
0

Move qemu init for tests to separate function

This commit is contained in:
2018-09-20 23:45:46 +00:00
parent 5c31812089
commit 667c42a8c6
2 changed files with 13 additions and 6 deletions

View File

@@ -85,10 +85,11 @@ type QemuSystem struct {
}
// NewQemuSystem constructor
func NewQemuSystem(arch arch, kernel Kernel, drivePath string) (q QemuSystem, err error) {
func NewQemuSystem(arch arch, kernel Kernel, drivePath string) (q *QemuSystem, err error) {
if _, err = exec.LookPath("qemu-system-" + string(arch)); err != nil {
return
}
q = &QemuSystem{}
q.arch = arch
if _, err = os.Stat(kernel.Path); err != nil {