summaryrefslogtreecommitdiff
path: root/src/initramfs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/initramfs.rs')
-rw-r--r--src/initramfs.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/initramfs.rs b/src/initramfs.rs
index ddb1010..1c5c089 100644
--- a/src/initramfs.rs
+++ b/src/initramfs.rs
@@ -178,7 +178,8 @@ pub struct InitramfsResult {
}
impl InitramfsResult {
- fn from_rootfs(rootfs: &Path, kernel: &KernelVersion) -> Result<Self> {
+ /// Record the generated initrd as a rootfs-relative semantic fact.
+ pub fn from_rootfs(rootfs: &Path, kernel: &KernelVersion) -> Result<Self> {
let initrd_path = PathBuf::from(format!("boot/initrd-{}.img", kernel.as_str()));
let contents = fs::read(rootfs.join(&initrd_path))
.with_context(|| format!("read generated initrd {}", initrd_path.display()))?;