mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-24 03:49:45 +00:00
pkg/build: copy image to output dir
For vmm we need a pre-created image. So if one is provided in the userspace dir, copy it to output. This should be enough to get vmm working. Update #712
This commit is contained in:
parent
3805b76483
commit
a0be1d1210
@ -30,16 +30,16 @@ func (ctx openbsd) build(targetArch, vmType, kernelDir, outputDir, compiler, use
|
||||
}
|
||||
|
||||
for src, dst := range map[string]string{
|
||||
"obj/bsd": "kernel",
|
||||
"obj/bsd.gdb": "obj/bsd.gdb",
|
||||
filepath.Join(compileDir, "obj/bsd"): "kernel",
|
||||
filepath.Join(compileDir, "obj/bsd.gdb"): "obj/bsd.gdb",
|
||||
filepath.Join(userspaceDir, "image"): "image",
|
||||
filepath.Join(userspaceDir, "key"): "key",
|
||||
} {
|
||||
fullSrc := filepath.Join(compileDir, src)
|
||||
fullDst := filepath.Join(outputDir, dst)
|
||||
if err := osutil.CopyFile(fullSrc, fullDst); err != nil {
|
||||
return fmt.Errorf("failed to copy %v -> %v: %v", fullSrc, fullDst, err)
|
||||
if err := osutil.CopyFile(src, fullDst); err != nil {
|
||||
return fmt.Errorf("failed to copy %v -> %v: %v", src, fullDst, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user