(source: &Path, image_path: &Path)
| 81 | } |
| 82 | |
| 83 | pub fn create_rootfs_image_from_dir(source: &Path, image_path: &Path) -> Result<(), String> { |
| 84 | let image_size = rootfs_image_size_bytes(source)?; |
| 85 | create_ext4_image_from_dir_with_size(source, image_path, image_size)?; |
| 86 | if let Err(err) = normalize_sandbox_owner_in_rootfs_image(source, image_path) { |
| 87 | let _ = fs::remove_file(image_path); |
| 88 | return Err(err); |
| 89 | } |
| 90 | Ok(()) |
| 91 | } |
| 92 | |
| 93 | pub fn create_ext4_image_from_dir_with_size( |
| 94 | source: &Path, |
no test coverage detected