Merge pull request #8169 from openanolis/chao/fix_typo_shm

runtime-rs: fix a typo in shm
This commit is contained in:
Chao Wu
2023-11-10 14:00:11 +08:00
committed by GitHub
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
}