mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
shimv2: add a comment in checkAndMount()
In checkAndMount(), it is not clear why we check IsBlockDevice() and if DisableBlockDeviceUse == false and then only return "false, nil" instead of "false, err". Adding a comment to make it a bit more readable. Fixes: #732 Signed-off-by: Qian Cai <cai@redhat.com>
This commit is contained in:
parent
059e6426e9
commit
7225460a68
@ -179,6 +179,7 @@ func checkAndMount(s *service, r *taskAPI.CreateTaskRequest) (bool, error) {
|
||||
if len(r.Rootfs) == 1 {
|
||||
m := r.Rootfs[0]
|
||||
|
||||
// Plug the block backed rootfs directly instead of mounting it.
|
||||
if katautils.IsBlockDevice(m.Source) && !s.config.HypervisorConfig.DisableBlockDeviceUse {
|
||||
return false, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user