Skip to content

Commit 18f890f

Browse files
committed
Rename kargs.rs -> bootc_kargs.rs
It's confusing we have both kargs.rs and kernel.rs where the latter is also handling kernel arguments. Clarify what this does. Signed-off-by: Colin Walters <[email protected]>
1 parent a279555 commit 18f890f

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

crates/lib/src/kargs.rs renamed to crates/lib/src/bootc_kargs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! This module handles the bootc-owned kernel argument lists in `/usr/lib/bootc/kargs.d`.
12
use anyhow::{Context, Result};
23
use camino::Utf8Path;
34
use cap_std_ext::cap_std::fs::Dir;
@@ -15,6 +16,7 @@ use serde::Deserialize;
1516
use crate::deploy::ImageState;
1617
use crate::store::Storage;
1718

19+
/// The relative path to the kernel arguments which may be embedded in an image.
1820
const KARGS_PATH: &str = "usr/lib/bootc/kargs.d";
1921

2022
/// The kargs.d configuration file.

crates/lib/src/deploy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ async fn deploy(
538538
// is a distinct minor issue, but not super important as right now the install path
539539
// doesn't use this API).
540540
let override_kargs = if let Some(deployment) = merge_deployment {
541-
Some(crate::kargs::get_kargs(sysroot, &deployment, image)?)
541+
Some(crate::bootc_kargs::get_kargs(sysroot, &deployment, image)?)
542542
} else {
543543
None
544544
};

crates/lib/src/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ async fn install_container(
817817
.repo()
818818
.read_commit(pulled_image.ostree_commit.as_str(), gio::Cancellable::NONE)?
819819
.0;
820-
let kargsd = crate::kargs::get_kargs_from_ostree_root(
820+
let kargsd = crate::bootc_kargs::get_kargs_from_ostree_root(
821821
&sysroot.repo(),
822822
merged_ostree_root.downcast_ref().unwrap(),
823823
std::env::consts::ARCH,

crates/lib/src/install/completion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn reconcile_kargs(sysroot: &ostree::Sysroot, deployment: &ostree::Deployment) -
6565
.flatten()
6666
.map(|s| s.as_str())
6767
.collect::<Vec<_>>();
68-
let kargsd = crate::kargs::get_kargs_in_root(deployment_root, std::env::consts::ARCH)?;
68+
let kargsd = crate::bootc_kargs::get_kargs_in_root(deployment_root, std::env::consts::ARCH)?;
6969
let kargsd = kargsd.iter().map(|s| s.as_str()).collect::<Vec<_>>();
7070

7171
current_kargs.append_argv(&install_config_kargs);

crates/lib/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! to provide a fully "container native" tool for using
55
//! bootable container images.
66
7+
pub(crate) mod bootc_kargs;
78
mod boundimage;
89
mod cfsctl;
910
pub mod cli;
@@ -15,7 +16,6 @@ mod image;
1516
mod imgstorage;
1617
pub(crate) mod journal;
1718
mod k8sapitypes;
18-
pub(crate) mod kargs;
1919
mod lints;
2020
mod lsm;
2121
pub(crate) mod metadata;

crates/lib/src/lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static LINT_KARGS: Lint = Lint::new_fatal(
465465
check_parse_kargs,
466466
);
467467
fn check_parse_kargs(root: &Dir, _config: &LintExecutionConfig) -> LintResult {
468-
let args = crate::kargs::get_kargs_in_root(root, ARCH)?;
468+
let args = crate::bootc_kargs::get_kargs_in_root(root, ARCH)?;
469469
tracing::debug!("found kargs: {args:?}");
470470
lint_ok()
471471
}

0 commit comments

Comments
 (0)