mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 19:35:32 +00:00
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:
parent
fc6bf8cf80
commit
7f50a41525
2
qemu.go
2
qemu.go
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user