diff --git a/crates/initramfs/src/mount.rs b/crates/initramfs/src/lib.rs similarity index 98% rename from crates/initramfs/src/mount.rs rename to crates/initramfs/src/lib.rs index 5dea8c9d5..005917f4b 100644 --- a/crates/initramfs/src/mount.rs +++ b/crates/initramfs/src/lib.rs @@ -102,8 +102,8 @@ pub struct Args { pub target: Option, } -// Helpers -fn mount_at_wrapper( +/// Wrapper around [`composefs::mount::mount_at`] +pub fn mount_at_wrapper( fs_fd: impl AsFd, dirfd: impl AsFd, path: impl path::Arg + Debug + Clone, @@ -242,7 +242,8 @@ fn mount_subdir( } #[context("GPT workaround")] -pub(crate) fn gpt_workaround() -> Result<()> { +/// Workaround for /dev/gpt-auto-root +pub fn gpt_workaround() -> Result<()> { // https://github.com/systemd/systemd/issues/35017 let rootdev = stat("/dev/gpt-auto-root"); diff --git a/crates/initramfs/src/main.rs b/crates/initramfs/src/main.rs index 088c57a5a..ebe266a8e 100644 --- a/crates/initramfs/src/main.rs +++ b/crates/initramfs/src/main.rs @@ -1,12 +1,10 @@ //! Code for bootc that goes into the initramfs. // SPDX-License-Identifier: Apache-2.0 OR MIT -mod mount; - use anyhow::Result; +use bootc_initramfs_setup::{gpt_workaround, setup_root, Args}; use clap::Parser; -use mount::{gpt_workaround, setup_root, Args}; fn main() -> Result<()> { let args = Args::parse();