From 9af0e56527b9db105e282d4c64d59b54c67711ff Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Tue, 25 Apr 2023 17:26:12 +0200 Subject: [PATCH] tool(esp): add systemd stub filenames mapping for systems --- rust/tool/shared/src/esp.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/tool/shared/src/esp.rs b/rust/tool/shared/src/esp.rs index 3087d4c..e81ef7b 100644 --- a/rust/tool/shared/src/esp.rs +++ b/rust/tool/shared/src/esp.rs @@ -16,7 +16,14 @@ pub enum Architecture { AArch64, } -impl System { +impl Architecture { + pub fn systemd_stub_filename(&self) -> &Path { + Path::new(match self { + Self::X86 => "linuxx64.efi.stub", + Self::AArch64 => "linuxaa64.efi.stub" + }) + } + pub fn systemd_filename(&self) -> &Path { Path::new(match self { Self::X86 => "systemd-bootx64.efi",