runtime-rs: fix a typo in shm

is_shim_volume should be is_shm_volume in shm_volume mod.

fixes: #8168
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
This commit is contained in:
Chao Wu 2023-10-08 19:15:37 +08:00
parent 2b937400fe
commit afb002c25c
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ impl VolumeResource {
// handle mounts
for m in oci_mounts {
let read_only = m.options.iter().any(|opt| opt == "ro");
let volume: Arc<dyn Volume> = if shm_volume::is_shim_volume(m) {
let volume: Arc<dyn Volume> = if shm_volume::is_shm_volume(m) {
let shm_size = shm_volume::DEFAULT_SHM_SIZE;
Arc::new(
shm_volume::ShmVolume::new(m, shm_size)

View File

@ -112,6 +112,6 @@ impl Volume for ShmVolume {
}
}
pub(crate) fn is_shim_volume(m: &oci::Mount) -> bool {
pub(crate) fn is_shm_volume(m: &oci::Mount) -> bool {
m.destination == "/dev/shm" && m.r#type != KATA_EPHEMERAL_DEV_TYPE
}