Skip to content

Commit 14cf04b

Browse files
cgwaltersjeckersb
authored andcommitted
install: Hoist out a const for linux partition type
Signed-off-by: Colin Walters <[email protected]>
1 parent f00395c commit 14cf04b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/install/baseline.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ use crate::task::Task;
3232
// This ensures we end up under 512 to be small-sized.
3333
pub(crate) const BOOTPN_SIZE_MB: u32 = 510;
3434
pub(crate) const EFIPN_SIZE_MB: u32 = 512;
35+
/// The GPT type for "linux"
36+
pub(crate) const LINUX_PARTTYPE: &str = "0FC63DAF-8483-4772-8E79-3D69D8477DE4";
3537

3638
#[derive(clap::ValueEnum, Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
3739
#[serde(rename_all = "kebab-case")]
@@ -307,7 +309,7 @@ pub(crate) fn install_create_rootfs(
307309
rootpn,
308310
root_size,
309311
"root",
310-
Some("0FC63DAF-8483-4772-8E79-3D69D8477DE4"),
312+
Some(LINUX_PARTTYPE),
311313
);
312314
sgdisk.run().context("Failed to run sgdisk")?;
313315
tracing::debug!("Created partition table");

0 commit comments

Comments
 (0)