Skip to content

Conversation

@Johan-Liebert1
Copy link
Collaborator

Create a lib.rs as we'd like to utilize these functions elsewhere in the codebase

Also: Prep for #1560

@bootc-bot bootc-bot bot requested a review from cgwalters August 29, 2025 10:14
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully refactors the initramfs crate into a library by renaming src/mount.rs to src/lib.rs and making several functions public. The main.rs binary is correctly updated to use this new library structure. The changes are logical and align with the goal of making the functionality reusable. I have one suggestion to improve the documentation of a newly exposed function to make it more informative for library consumers.


#[context("GPT workaround")]
pub(crate) fn gpt_workaround() -> Result<()> {
/// Workaround for /dev/gpt-auto-root
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since this function is now part of a public library API, the documentation could be more descriptive. It would be helpful to explain what the workaround entails and why it is necessary, including a reference to the underlying issue. This will provide better context for developers using this library.

/// Workaround for a systemd issue where `/dev/gpt-auto-root` is not correctly handled.
/// See: https://github.com/systemd/systemd/issues/35017

Create a lib.rs as we'd like to utilize these functions elsewhere in the
codebase

Signed-off-by: Johan-Liebert1 <[email protected]>
@Johan-Liebert1 Johan-Liebert1 force-pushed the composefs-initramfs-lib branch from 1d00ddb to b636b43 Compare August 29, 2025 10:22
@cgwalters cgwalters merged commit 1c552d8 into bootc-dev:main Aug 29, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants