Files
pmaports-rtwo/temp/powervm-boot/0002-Fix-loader-directory-path.patch
T
Aelin 06bdbdba69 temp/powervm-boot: new aport
This is a bootloader for Open Firmware PowerPC systems that we will use
to replace grub-ieee1275 in device-generic-ppc64le. Due to its use of
RUSTC_BOOTSTRAP, this APKBUILD cannot go to Alpine at the moment, but
once the Rust targets are added upstream, this can be moved to aports.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9002>
2026-08-03 19:24:11 +00:00

57 lines
2.3 KiB
Diff

diff --git a/src/fs.rs b/src/fs.rs
index e5290ea..af190be 100644
--- a/src/fs.rs
+++ b/src/fs.rs
@@ -4,7 +4,7 @@ use alloc::vec::Vec;
use crate::disk::{PROMDisk, Partition};
pub trait BootFilesystem {
- /// List BLS entries from loaders/entries/*.conf.
+ /// List BLS entries from loader/entries/*.conf.
/// Returns (filename_stem, file_content) pairs.
fn list_bls_entries(&self) -> Result<Vec<(String, String)>, &'static str>;
@@ -17,8 +17,8 @@ type FatPartition = hadris_fat::FatFs<Partition<PROMDisk>>;
impl BootFilesystem for FatPartition {
fn list_bls_entries(&self) -> Result<Vec<(String, String)>, &'static str> {
let entries_dir = self
- .open_dir_path("loaders/entries")
- .map_err(|_| "failed to open loaders/entries")?;
+ .open_dir_path("loader/entries")
+ .map_err(|_| "failed to open loader/entries")?;
let mut result = Vec::new();
for entry in entries_dir.entries() {
@@ -75,7 +75,7 @@ impl BootFilesystem for IsoPartition {
fn list_bls_entries(&self) -> Result<Vec<(String, String)>, &'static str> {
let root = self.root_dir();
- let loaders_dir_ref = {
+ let loader_dir_ref = {
let mut found = None;
for entry in root.iter(self).entries() {
let entry = match entry {
@@ -86,18 +86,18 @@ impl BootFilesystem for IsoPartition {
continue;
}
let name = entry.display_name();
- if name.eq_ignore_ascii_case("loaders") {
+ if name.eq_ignore_ascii_case("loader") {
found = Some(entry.as_dir_ref(self).map_err(|_| "as_dir_ref failed")?);
break;
}
}
- found.ok_or("loaders directory not found")?
+ found.ok_or("loader directory not found")?
};
let entries_dir_ref = {
- let loaders_dir = self.open_dir(loaders_dir_ref);
+ let loader_dir = self.open_dir(loader_dir_ref);
let mut found = None;
- for entry in loaders_dir.entries() {
+ for entry in loader_dir.entries() {
let entry = match entry {
Ok(e) => e,
Err(_) => continue,