Skip to content

Commit 630f145

Browse files
committed
feat(uefi): prefer booting from \EFI\hermit
1 parent 362e352 commit 630f145

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/os/uefi/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,14 @@ impl Esp {
135135
}
136136

137137
pub fn read_app(&mut self) -> Vec<u8> {
138-
self.read_app_at(cstr16!(r"\EFI\BOOT\hermit-app")).unwrap()
138+
self.read_app_at(cstr16!(r"\EFI\hermit\hermit-app"))
139+
.or_else(|| self.read_app_at(cstr16!(r"\EFI\BOOT\hermit-app")))
140+
.unwrap()
139141
}
140142

141143
pub fn read_bootargs(&mut self) -> Option<String> {
142-
self.read_bootargs_at(cstr16!(r"\EFI\BOOT\hermit-bootargs"))
144+
self.read_bootargs_at(cstr16!(r"\EFI\hermit\hermit-bootargs"))
145+
.or_else(|| self.read_bootargs_at(cstr16!(r"\EFI\BOOT\hermit-bootargs")))
143146
}
144147

145148
fn read_app_at<P: AsRef<Path>>(&mut self, path: P) -> Option<Vec<u8>> {

0 commit comments

Comments
 (0)