From 46965739a4a7bbe37bcaa15717eb939d9371cb05 Mon Sep 17 00:00:00 2001 From: Ji-Xinyou Date: Thu, 22 Sep 2022 16:06:51 +0800 Subject: [PATCH] runtime-rs: remove hardcoded string Use KATA_PATH instead of "run/kata" Fixes: #5229 Signed-off-by: Ji-Xinyou --- src/runtime-rs/crates/runtimes/src/shim_mgmt/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime-rs/crates/runtimes/src/shim_mgmt/server.rs b/src/runtime-rs/crates/runtimes/src/shim_mgmt/server.rs index e8cc316892..0ad1552d2a 100644 --- a/src/runtime-rs/crates/runtimes/src/shim_mgmt/server.rs +++ b/src/runtime-rs/crates/runtimes/src/shim_mgmt/server.rs @@ -16,6 +16,7 @@ use std::{fs, path::Path, sync::Arc}; use anyhow::{Context, Result}; use common::Sandbox; use hyper::{server::conn::Http, service::service_fn}; +use persist::KATA_PATH; use tokio::net::UnixListener; use super::handlers::handler_mux; @@ -76,7 +77,7 @@ impl MgmtServer { // return sandbox's storage path pub fn sb_storage_path() -> String { - String::from("/run/kata") + String::from(KATA_PATH) } // returns the address of the unix domain socket(UDS) for communication with shim