mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 04:04:45 +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) {
|
func LaunchQemu(ctx context.Context, params []string, fds []*os.File, logger QMPLog) (string, error) {
|
||||||
errStr := ""
|
errStr := ""
|
||||||
cmd := exec.Command("qemu-system-x86_64", params...)
|
cmd := exec.Command("qemu-system-x86_64", params...)
|
||||||
if fds != nil {
|
if len(fds) > 0 {
|
||||||
logger.Infof("Adding extra file %v", fds)
|
logger.Infof("Adding extra file %v", fds)
|
||||||
cmd.ExtraFiles = fds
|
cmd.ExtraFiles = fds
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user