1 Commits
Author SHA256 Message Date
kira 18ff508fe5 Fix for get_efi_part_info (regexp fix) 2026-10-24 17:51:10 +02:00
3 changed files with 5 additions and 4 deletions

No files matched your search

Generated
+1 -1
View File
@@ -152,7 +152,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hive-up"
version = "0.2.8"
version = "0.2.9"
dependencies = [
"clap",
"nix",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "hive-up"
version = "0.2.8"
version = "0.2.9"
edition = "2024"
[dependencies]
+3 -2
View File
@@ -114,7 +114,7 @@ impl std::fmt::Display for ExecCommandError {
write!(f, "IO streem to String parse Error: {}", e)
}
ExecCommandError::CommandFailed(ex) => {
write!(f, "{}", ex)
write!(f, "{}", ex.to_string())
}
ExecCommandError::Other(msg) => write!(f, "Error: {}", msg),
}
@@ -498,7 +498,7 @@ pub fn check_if_run_as_root() -> bool {
///
fn get_efi_part_info() -> Result<(String, String), ExecCommandError> {
use regex_lite::Regex;
let re = Regex::new(r#"^PARTN="([0-9]+)" PKNAME="([a-zA-Z0-9]+)"$"#).unwrap();
let re = Regex::new(r#"^PARTN="([0-9]+)" PKNAME="([a-zA-Z0-9]+)""#).unwrap();
let lsblk_query = format!("PARTLABEL==\"{}\"", EFI_PARTLABEL);
let lsblk_args: Vec<&str> = vec!["-P", "-p", "-Q", &lsblk_query, "-o", "PARTN,PKNAME"];
@@ -604,6 +604,7 @@ pub fn init_efi_boot_record(maybe_kernel_cmd: &Option<String>) -> Result<(), Exe
// 1 delete all bootnums
delete_all_efi_bootnums()?;
// 2 create defaul
println!("Creating EFI boot records...");
efi_boot_record_create(0, BOOT_MENU_LABEL, BOOT_UKI_IMAGE_NAME, maybe_kernel_cmd)?;
efi_boot_record_create(
1,