mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 05:34:46 +00:00
runtime: Add identification in version for runtime-rs
Now we are supporting two runtime/shim, the go version, and the rust version, for debug purposes, we can add an identification in the version info to tell us which runtime/shim is used. Fixes: #5806 Signed-off-by: Bin Liu <bin@hyper.sh>
This commit is contained in:
parent
1da2d0603c
commit
d4321ab489
@ -95,7 +95,7 @@ fn show_help(cmd: &OsStr) {
|
||||
|
||||
fn show_version(err: Option<anyhow::Error>) {
|
||||
let data = format!(
|
||||
r#"{} containerd shim: id: {}, version: {}, commit: {}"#,
|
||||
r#"{} containerd shim (Rust): id: {}, version: {}, commit: {}"#,
|
||||
config::PROJECT_NAME,
|
||||
config::CONTAINERD_RUNTIME_NAME,
|
||||
config::RUNTIME_VERSION,
|
||||
|
@ -24,7 +24,7 @@ func shimConfig(config *shimapi.Config) {
|
||||
func main() {
|
||||
|
||||
if len(os.Args) == 2 && os.Args[1] == "--version" {
|
||||
fmt.Printf("%s containerd shim: id: %q, version: %s, commit: %v\n", katautils.PROJECT, types.DefaultKataRuntimeName, katautils.VERSION, katautils.COMMIT)
|
||||
fmt.Printf("%s containerd shim (Golang): id: %q, version: %s, commit: %v\n", katautils.PROJECT, types.DefaultKataRuntimeName, katautils.VERSION, katautils.COMMIT)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user