-
Notifications
You must be signed in to change notification settings - Fork 152
More kargs improvements and hoisting parsing into clap #1761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e2e5b86
1f1b986
c82523d
1a613ca
44bdb67
ec3895c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ use std::path::Path; | |
|
|
||
| use anyhow::{anyhow, Context, Result}; | ||
| use bootc_blockdev::find_parent_devices; | ||
| use bootc_kernel_cmdline::utf8::Cmdline; | ||
| use bootc_mount::inspect_filesystem_of_dir; | ||
| use bootc_mount::tempmount::TempMount; | ||
| use camino::{Utf8Path, Utf8PathBuf}; | ||
|
|
@@ -380,13 +381,17 @@ pub(crate) fn setup_composefs_bls_boot( | |
| let (root_path, esp_device, cmdline_refs, fs, bootloader) = match setup_type { | ||
| BootSetupType::Setup((root_setup, state, fs)) => { | ||
| // root_setup.kargs has [root=UUID=<UUID>, "rw"] | ||
| let mut cmdline_options = String::from(root_setup.kargs.join(" ")); | ||
| let mut cmdline_options = Cmdline::new(); | ||
|
|
||
| if state.composefs_options.insecure { | ||
| cmdline_options.push_str(&format!(" {COMPOSEFS_CMDLINE}=?{id_hex}")); | ||
| cmdline_options.extend(&root_setup.kargs); | ||
|
|
||
| let composefs_cmdline = if state.composefs_options.insecure { | ||
| format!("{COMPOSEFS_CMDLINE}=?{id_hex}") | ||
| } else { | ||
| cmdline_options.push_str(&format!(" {COMPOSEFS_CMDLINE}={id_hex}")); | ||
| } | ||
| format!("{COMPOSEFS_CMDLINE}={id_hex}") | ||
| }; | ||
|
|
||
| cmdline_options.extend(&Cmdline::from(&composefs_cmdline)); | ||
|
|
||
| // Locate ESP partition device | ||
| let esp_part = esp_in(&root_setup.device_info)?; | ||
|
|
@@ -407,12 +412,10 @@ pub(crate) fn setup_composefs_bls_boot( | |
| ( | ||
| Utf8PathBuf::from("/sysroot"), | ||
| get_esp_partition(&sysroot_parent)?.0, | ||
| [ | ||
| format!("root=UUID={}", this_arch_root()), | ||
| RW_KARG.to_string(), | ||
| format!("{COMPOSEFS_CMDLINE}={id_hex}"), | ||
| ] | ||
| .join(" "), | ||
| Cmdline::from(format!( | ||
| "root=UUID={} {RW_KARG} {COMPOSEFS_CMDLINE}={id_hex}", | ||
| this_arch_root() | ||
| )), | ||
|
Comment on lines
+415
to
+418
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it'd be cleaner for this to remain split up kargs instead of being parsed from a string again.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's all just |
||
| fs, | ||
| bootloader, | ||
| ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.