libfdt: Rename Fdt::bytes to Fdt::buffer
To reduce potential confusion, rename the private field.
Note: No change intended.
Bug: 255521657
Test: atest MicrodroidTestApp
Change-Id: Ic4eebf81182d4313befe0fc8b50a0f3aa24169b2
diff --git a/libs/libfdt/src/lib.rs b/libs/libfdt/src/lib.rs
index 9201243..ff1db63 100644
--- a/libs/libfdt/src/lib.rs
+++ b/libs/libfdt/src/lib.rs
@@ -382,7 +382,7 @@
let offset =
(prop as usize).checked_sub(self.fdt.as_ptr() as usize).ok_or(FdtError::Internal)?;
- Ok(Some(self.fdt.bytes.get(offset..(offset + len)).ok_or(FdtError::Internal)?))
+ Ok(Some(self.fdt.buffer.get(offset..(offset + len)).ok_or(FdtError::Internal)?))
}
/// Get reference to the containing device tree.
@@ -511,7 +511,7 @@
/// Wrapper around low-level libfdt functions.
#[repr(transparent)]
pub struct Fdt {
- bytes: [u8],
+ buffer: [u8],
}
impl Fdt {
@@ -639,7 +639,7 @@
}
fn check_full(&self) -> Result<()> {
- let len = self.bytes.len();
+ let len = self.buffer.len();
// SAFETY - Only performs read accesses within the limits of the slice. If successful, this
// call guarantees to other unsafe calls that the header contains a valid totalsize (w.r.t.
// 'len' i.e. the self.fdt slice) that those C functions can use to perform bounds
@@ -658,6 +658,6 @@
}
fn capacity(&self) -> usize {
- self.bytes.len()
+ self.buffer.len()
}
}