aboutsummaryrefslogtreecommitdiffstats
path: root/vm/qemu/qemu.go
diff options
context:
space:
mode:
Diffstat (limited to 'vm/qemu/qemu.go')
-rw-r--r--vm/qemu/qemu.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go
index 398eb8047..3fb78e9fb 100644
--- a/vm/qemu/qemu.go
+++ b/vm/qemu/qemu.go
@@ -5,6 +5,7 @@ package qemu
import (
"bytes"
+ "context"
"encoding/json"
"fmt"
"io"
@@ -667,7 +668,7 @@ func (inst *instance) Copy(hostSrc string) (string, error) {
return vmDst, nil
}
-func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command string) (
+func (inst *instance) Run(ctx context.Context, command string) (
<-chan []byte, <-chan error, error) {
rpipe, wpipe, err := osutil.LongPipe()
if err != nil {
@@ -707,8 +708,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin
return nil, nil, err
}
wpipe.Close()
- return vmimpl.Multiplex(cmd, inst.merger, timeout, vmimpl.MultiplexConfig{
- Stop: stop,
+ return vmimpl.Multiplex(ctx, cmd, inst.merger, vmimpl.MultiplexConfig{
Debug: inst.debug,
Scale: inst.timeouts.Scale,
})