Switch ParcelFileDescriptor to OwnerFd
The inner type of ParcelFileDescriptor is switching
from std::fs::File to std::os::fd::OwnedFd.
Update all uses accordingly.
Bug: 242243245
Test: m
Change-Id: I10fce8d12f46f7dbbe12d399d7d5b970ccf313e0
diff --git a/virtualizationservice/vfio_handler/src/aidl.rs b/virtualizationservice/vfio_handler/src/aidl.rs
index 2968ff9..63f19c6 100644
--- a/virtualizationservice/vfio_handler/src/aidl.rs
+++ b/virtualizationservice/vfio_handler/src/aidl.rs
@@ -282,11 +282,13 @@
.or_binder_exception(ExceptionCode::ILLEGAL_STATE)?;
let buffer = read_values(dtbo_img_file, dt_size, entry.dt_offset.get().into())?;
- let mut dtbo_fd = dtbo_fd
- .as_ref()
- .try_clone()
- .context("Failed to clone File from ParcelFileDescriptor")
- .or_binder_exception(ExceptionCode::BAD_PARCELABLE)?;
+ let mut dtbo_fd = File::from(
+ dtbo_fd
+ .as_ref()
+ .try_clone()
+ .context("Failed to create File from ParcelFileDescriptor")
+ .or_binder_exception(ExceptionCode::BAD_PARCELABLE)?,
+ );
dtbo_fd
.write_all(&buffer)