mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-03 14:07:24 +00:00
runtime-rs: remove hardcoded string
Use KATA_PATH instead of "run/kata" Fixes: #5229 Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
This commit is contained in:
parent
cb977c04bd
commit
46965739a4
@ -16,6 +16,7 @@ use std::{fs, path::Path, sync::Arc};
|
|||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use common::Sandbox;
|
use common::Sandbox;
|
||||||
use hyper::{server::conn::Http, service::service_fn};
|
use hyper::{server::conn::Http, service::service_fn};
|
||||||
|
use persist::KATA_PATH;
|
||||||
use tokio::net::UnixListener;
|
use tokio::net::UnixListener;
|
||||||
|
|
||||||
use super::handlers::handler_mux;
|
use super::handlers::handler_mux;
|
||||||
@ -76,7 +77,7 @@ impl MgmtServer {
|
|||||||
|
|
||||||
// return sandbox's storage path
|
// return sandbox's storage path
|
||||||
pub fn sb_storage_path() -> String {
|
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
|
// returns the address of the unix domain socket(UDS) for communication with shim
|
||||||
|
Loading…
Reference in New Issue
Block a user