mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 04:18:26 +00:00
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:
parent
2b937400fe
commit
afb002c25c
@ -68,7 +68,7 @@ impl VolumeResource {
|
|||||||
// handle mounts
|
// handle mounts
|
||||||
for m in oci_mounts {
|
for m in oci_mounts {
|
||||||
let read_only = m.options.iter().any(|opt| opt == "ro");
|
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;
|
let shm_size = shm_volume::DEFAULT_SHM_SIZE;
|
||||||
Arc::new(
|
Arc::new(
|
||||||
shm_volume::ShmVolume::new(m, shm_size)
|
shm_volume::ShmVolume::new(m, shm_size)
|
||||||
|
@ -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
|
m.destination == "/dev/shm" && m.r#type != KATA_EPHEMERAL_DEV_TYPE
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user