aboutsummaryrefslogtreecommitdiffstats
path: root/vm/qemu
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-07-08 12:45:31 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-07-11 09:03:37 +0000
commitbdca406b2cf89f029207aa8213460ec7a3267ccc (patch)
tree077a43542b50ba8c6db9cc91567fb332032a3913 /vm/qemu
parenta893841a9f868b1590b9dacfa772d634629ad88d (diff)
vm: make Instance implement io.Closer
It's better to follow standard interfaces.
Diffstat (limited to 'vm/qemu')
-rw-r--r--vm/qemu/qemu.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go
index e12d8d7c6..4d9859c0c 100644
--- a/vm/qemu/qemu.go
+++ b/vm/qemu/qemu.go
@@ -395,7 +395,7 @@ func (pool *Pool) ctor(workdir, sshkey, sshuser string, index int) (vmimpl.Insta
return inst, nil
}
-func (inst *instance) Close() {
+func (inst *instance) Close() error {
if inst.qemu != nil {
inst.qemu.Process.Kill()
inst.qemu.Wait()
@@ -412,6 +412,7 @@ func (inst *instance) Close() {
if inst.mon != nil {
inst.mon.Close()
}
+ return nil
}
func (inst *instance) boot() error {