mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
runtime: Fix some leftover go fmt errors
A few "go fmt" errors appear to have crept it. Clean them up with "go fmt ./..." in the src/runtime directory. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c811dd7484
commit
cf36fd87ad
@ -90,7 +90,7 @@ func availableGuestProtection() (guestProtection, error) {
|
|||||||
return noneProtection, err
|
return noneProtection, err
|
||||||
}
|
}
|
||||||
if !seCmdlinePresent {
|
if !seCmdlinePresent {
|
||||||
return noneProtection, fmt.Errorf("Protected Virtualization is not enabled on kernel command line! " +
|
return noneProtection, fmt.Errorf("Protected Virtualization is not enabled on kernel command line! "+
|
||||||
"Need %s=%s (or %s) to enable Secure Execution",
|
"Need %s=%s (or %s) to enable Secure Execution",
|
||||||
seCmdlineParam, seCmdlineValues[0], strings.Join(seCmdlineValues[1:], ", "))
|
seCmdlineParam, seCmdlineValues[0], strings.Join(seCmdlineValues[1:], ", "))
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ package virtcontainers
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
govmmQemu "github.com/kata-containers/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
@ -100,29 +100,29 @@ func (q *qemuArm64) appendImage(ctx context.Context, devices []govmmQemu.Device,
|
|||||||
// so we temporarily add this specific implementation for arm64 here until
|
// so we temporarily add this specific implementation for arm64 here until
|
||||||
// the qemu used by arm64 is capable for that feature
|
// the qemu used by arm64 is capable for that feature
|
||||||
func (q *qemuArm64) appendNvdimmImage(devices []govmmQemu.Device, path string) ([]govmmQemu.Device, error) {
|
func (q *qemuArm64) appendNvdimmImage(devices []govmmQemu.Device, path string) ([]govmmQemu.Device, error) {
|
||||||
imageFile, err := os.Open(path)
|
imageFile, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer imageFile.Close()
|
defer imageFile.Close()
|
||||||
|
|
||||||
imageStat, err := imageFile.Stat()
|
imageStat, err := imageFile.Stat()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
object := govmmQemu.Object{
|
object := govmmQemu.Object{
|
||||||
Driver: govmmQemu.NVDIMM,
|
Driver: govmmQemu.NVDIMM,
|
||||||
Type: govmmQemu.MemoryBackendFile,
|
Type: govmmQemu.MemoryBackendFile,
|
||||||
DeviceID: "nv0",
|
DeviceID: "nv0",
|
||||||
ID: "mem0",
|
ID: "mem0",
|
||||||
MemPath: path,
|
MemPath: path,
|
||||||
Size: (uint64)(imageStat.Size()),
|
Size: (uint64)(imageStat.Size()),
|
||||||
}
|
}
|
||||||
|
|
||||||
devices = append(devices, object)
|
devices = append(devices, object)
|
||||||
|
|
||||||
return devices, nil
|
return devices, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *qemuArm64) setIgnoreSharedMemoryMigrationCaps(_ context.Context, _ *govmmQemu.QMP) error {
|
func (q *qemuArm64) setIgnoreSharedMemoryMigrationCaps(_ context.Context, _ *govmmQemu.QMP) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user