mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-24 10:41:43 +00:00
cli: add initrd info to kata-env
Show the configured hypervisor initrd setting. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
parent
19c3555412
commit
21343d7d71
@ -30,7 +30,7 @@ import (
|
||||
//
|
||||
// XXX: Increment for every change to the output format
|
||||
// (meaning any change to the EnvInfo type).
|
||||
const formatVersion = "1.0.9"
|
||||
const formatVersion = "1.0.10"
|
||||
|
||||
// MetaInfo stores information on the format of the output itself
|
||||
type MetaInfo struct {
|
||||
@ -44,6 +44,11 @@ type KernelInfo struct {
|
||||
Parameters string
|
||||
}
|
||||
|
||||
// InitrdInfo stores initrd image details
|
||||
type InitrdInfo struct {
|
||||
Path string
|
||||
}
|
||||
|
||||
// ImageInfo stores root filesystem image details
|
||||
type ImageInfo struct {
|
||||
Path string
|
||||
@ -130,6 +135,7 @@ type EnvInfo struct {
|
||||
Hypervisor HypervisorInfo
|
||||
Image ImageInfo
|
||||
Kernel KernelInfo
|
||||
Initrd InitrdInfo
|
||||
Proxy ProxyInfo
|
||||
Shim ShimInfo
|
||||
Agent AgentInfo
|
||||
@ -307,12 +313,17 @@ func getEnvInfo(configFile string, config oci.RuntimeConfig) (env EnvInfo, err e
|
||||
Parameters: strings.Join(vc.SerializeParams(config.HypervisorConfig.KernelParams, "="), " "),
|
||||
}
|
||||
|
||||
initrd := InitrdInfo{
|
||||
Path: config.HypervisorConfig.InitrdPath,
|
||||
}
|
||||
|
||||
env = EnvInfo{
|
||||
Meta: meta,
|
||||
Runtime: runtime,
|
||||
Hypervisor: hypervisor,
|
||||
Image: image,
|
||||
Kernel: kernel,
|
||||
Initrd: initrd,
|
||||
Proxy: proxy,
|
||||
Shim: shim,
|
||||
Agent: agent,
|
||||
|
Loading…
Reference in New Issue
Block a user