(source: &Path)
| 427 | } |
| 428 | |
| 429 | fn rootfs_image_size_bytes(source: &Path) -> Result<u64, String> { |
| 430 | let used = directory_size_bytes(source)?; |
| 431 | let headroom = (used / 4).max(ROOTFS_IMAGE_MIN_HEADROOM_BYTES); |
| 432 | let size = (used + headroom).max(ROOTFS_IMAGE_MIN_SIZE_BYTES); |
| 433 | Ok(round_up_to_mib(size)) |
| 434 | } |
| 435 | |
| 436 | fn ext4_image_min_size_bytes(source: &Path) -> Result<u64, String> { |
| 437 | let used = directory_size_bytes(source)?; |
no test coverage detected