initramfs: Convert to library#1561
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 <pragyanpoudyal41999@gmail.com>
1d00ddb to
b636b43
Compare
Create a lib.rs as we'd like to utilize these functions elsewhere in the codebase
Also: Prep for #1560