qemu: Fix a silly bug in LaunchQemu

There's no point in setting cmd.ExtraFiles if the fds array is an
empty slice.  This won't do any harm but is essentially a no-op.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit is contained in:
Mark Ryan 2016-08-26 16:29:35 +01:00
parent fc6bf8cf80
commit 7f50a41525

View File

@ -51,7 +51,7 @@ import (
func LaunchQemu(ctx context.Context, params []string, fds []*os.File, logger QMPLog) (string, error) {
errStr := ""
cmd := exec.Command("qemu-system-x86_64", params...)
if fds != nil {
if len(fds) > 0 {
logger.Infof("Adding extra file %v", fds)
cmd.ExtraFiles = fds
}