Revert^2 "Upgrade zerocopy to 0.7.5"
893738e5702b1f065826d9a31cef2122a502da66
Change-Id: Ib91e64e7a32e6b31fa0bde93dbfc411c60d33301
diff --git a/virtualizationservice/vfio_handler/src/aidl.rs b/virtualizationservice/vfio_handler/src/aidl.rs
index 1c3c5d9..618c165 100644
--- a/virtualizationservice/vfio_handler/src/aidl.rs
+++ b/virtualizationservice/vfio_handler/src/aidl.rs
@@ -26,6 +26,7 @@
use rustutils::system_properties;
use zerocopy::{
byteorder::{BigEndian, U32},
+ FromZeroes,
FromBytes,
};
@@ -82,7 +83,7 @@
/// The structure of DT table header in dtbo.img.
/// https://source.android.com/docs/core/architecture/dto/partitions
#[repr(C)]
-#[derive(Debug, FromBytes)]
+#[derive(Debug, FromZeroes, FromBytes)]
struct DtTableHeader {
/// DT_TABLE_MAGIC
magic: U32<BigEndian>,
@@ -106,7 +107,7 @@
/// The structure of each DT table entry (v0) in dtbo.img.
/// https://source.android.com/docs/core/architecture/dto/partitions
#[repr(C)]
-#[derive(Debug, FromBytes)]
+#[derive(Debug, FromZeroes, FromBytes)]
struct DtTableEntry {
/// size of each DT
dt_size: U32<BigEndian>,