Skip to content

Commit 376dda2

Browse files
committed
Rename grub feature to composefs-backend
This should make it easier to incrementally merge changes here to main. Signed-off-by: Colin Walters <[email protected]>
1 parent 1324091 commit 376dda2

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

crates/lib/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ similar-asserts = { workspace = true }
7070
static_assertions = { workspace = true }
7171

7272
[features]
73-
default = ["install-to-disk", "grub"]
73+
default = ["install-to-disk"]
7474
# This feature enables `bootc install to-disk`, which is considered just a "demo"
7575
# or reference installer; we expect most nontrivial use cases to be using
7676
# `bootc install to-filesystem`.
7777
install-to-disk = []
78-
# Enable direct support for the GRUB bootloader
79-
grub = []
78+
# Enable support for the composefs native backend
79+
composefs-backend = []
8080
# This featuares enables `bootc internals publish-rhsm-facts` to integrate with
8181
# Red Hat Subscription Manager
8282
rhsm = []

crates/lib/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ mod containerenv;
3636
mod install;
3737
mod kernel_cmdline;
3838

39-
#[cfg(feature = "grub")]
39+
#[cfg(feature = "composefs-backend")]
40+
#[allow(dead_code)]
4041
pub(crate) mod parsers;
4142
#[cfg(feature = "rhsm")]
4243
mod rhsm;

crates/lib/src/parsers/grub_menuconfig.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ impl<'a> From<Vec<(&'a str, &'a str)>> for MenuentryBody<'a> {
7171

7272
/// A complete GRUB menuentry with title and body commands.
7373
#[derive(Debug, PartialEq, Eq)]
74-
#[allow(dead_code)]
7574
pub(crate) struct MenuEntry<'a> {
7675
/// Display title (supports escaped quotes)
7776
pub(crate) title: &'a str,
@@ -88,8 +87,7 @@ impl<'a> Display for MenuEntry<'a> {
8887
}
8988

9089
/// Parser that takes content until balanced brackets, handling nested brackets and escapes.
91-
#[allow(dead_code)]
92-
pub fn take_until_balanced_allow_nested(
90+
fn take_until_balanced_allow_nested(
9391
opening_bracket: char,
9492
closing_bracket: char,
9593
) -> impl Fn(&str) -> IResult<&str, &str> {
@@ -141,7 +139,6 @@ pub fn take_until_balanced_allow_nested(
141139
}
142140

143141
/// Parses a single menuentry with title and body commands.
144-
#[allow(dead_code)]
145142
fn parse_menuentry(input: &str) -> IResult<&str, MenuEntry<'_>> {
146143
let (input, _) = tag("menuentry").parse(input)?;
147144

@@ -190,14 +187,12 @@ fn parse_menuentry(input: &str) -> IResult<&str, MenuEntry<'_>> {
190187
}
191188

192189
/// Skips content until finding "menuentry" keyword or end of input.
193-
#[allow(dead_code)]
194190
fn skip_to_menuentry(input: &str) -> IResult<&str, ()> {
195191
let (input, _) = take_until("menuentry")(input)?;
196192
Ok((input, ()))
197193
}
198194

199195
/// Parses all menuentries from a GRUB configuration file.
200-
#[allow(dead_code)]
201196
fn parse_all(input: &str) -> IResult<&str, Vec<MenuEntry<'_>>> {
202197
let mut remaining = input;
203198
let mut entries = Vec::new();
@@ -229,7 +224,6 @@ fn parse_all(input: &str) -> IResult<&str, Vec<MenuEntry<'_>>> {
229224
}
230225

231226
/// Main entry point for parsing GRUB menuentry files.
232-
#[allow(dead_code)]
233227
pub(crate) fn parse_grub_menuentry_file(contents: &str) -> anyhow::Result<Vec<MenuEntry<'_>>> {
234228
let (_, entries) = parse_all(&contents)
235229
.map_err(|e| anyhow::anyhow!("Failed to parse GRUB menuentries: {e}"))?;

0 commit comments

Comments
 (0)