gbl: efi: src: android_boot.rs: let fdt_bytes not mutable
When compiling without EFI FDT, we have the following error:
let fdt_origin = Fdt::new(fdt_bytes)?;
--------- value moved here
...
let mut fdt = Fdt::new_from_init(&mut load[..], fdt_bytes)?;
^^^^^^^^^ value borrowed
here after move
Let fdt_bytes non-mutable solves this problem.
Change-Id: I86b973ce6a0ae3563e87458575e037004f70ea15
Signed-off-by: Ying-Chun Liu (PaulLiu) <liupa@google.com>
diff --git a/gbl/efi/src/android_boot.rs b/gbl/efi/src/android_boot.rs
index 6a9fa1c..b86d432 100644
--- a/gbl/efi/src/android_boot.rs
+++ b/gbl/efi/src/android_boot.rs
@@ -397,7 +397,7 @@
// product, it may come from vendor boot image.
let mut fdt_bytes_buffer = vec![0u8; max(vendor_dtb_size, boot_dtb_size)];
let fdt_bytes_buffer = &mut fdt_bytes_buffer[..];
- let fdt_bytes = match ops.get_custom_device_tree() {
+ let fdt_bytes: &[u8] = match ops.get_custom_device_tree() {
Some(fdt_bytes) => fdt_bytes,
None if vendor_dtb_size > 0 => {
let vendor_dtb_offset: usize = (SafeNum::from(vendor_hdr_size)