Skip to content

Commit 7aa96c4

Browse files
committed
install: Hoist ESP GUID to a const
Prep for further work. Signed-off-by: Colin Walters <[email protected]>
1 parent c4f3e33 commit 7aa96c4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/src/bootloader.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::task::Task;
77

88
/// The name of the mountpoint for efi (as a subdirectory of /boot, or at the toplevel)
99
pub(crate) const EFI_DIR: &str = "efi";
10+
pub(crate) const ESP_GUID: &str = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B";
1011
pub(crate) const PREPBOOT_GUID: &str = "9E1A2D38-C612-4316-AA26-8B49521E5A8B";
1112
pub(crate) const PREPBOOT_LABEL: &str = "PowerPC-PReP-boot";
1213
#[cfg(target_arch = "powerpc64")]

lib/src/install/baseline.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,11 @@ pub(crate) fn install_create_rootfs(
256256
}
257257

258258
let esp_partno = if super::ARCH_USES_EFI {
259+
let esp_guid = crate::bootloader::ESP_GUID;
259260
partno += 1;
260261
writeln!(
261262
&mut partitioning_buf,
262-
r#"size={EFIPN_SIZE_MB}MiB, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, name="EFI-SYSTEM""#
263+
r#"size={EFIPN_SIZE_MB}MiB, type={esp_guid}, name="EFI-SYSTEM""#
263264
)?;
264265
Some(partno)
265266
} else {

0 commit comments

Comments
 (0)