Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions uefi/src/proto/device_path/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,23 @@ pub use device_path_gen::{
acpi, bios_boot_spec, end, hardware, media, messaging, DevicePathNodeEnum,
};

use crate::proto::{unsafe_protocol, ProtocolPointer};
use core::ffi::c_void;
use core::fmt::{self, Debug, Display, Formatter};
use core::mem;
use core::ops::Deref;
use ptr_meta::Pointee;
use uefi::table::boot::ScopedProtocol;
#[cfg(feature = "alloc")]
use {alloc::borrow::ToOwned, alloc::boxed::Box, uefi::CString16};

use crate::prelude::BootServices;
use crate::proto::device_path::text::{AllowShortcuts, DevicePathToText, DisplayOnly};
use crate::proto::{unsafe_protocol, ProtocolPointer};
use crate::table::boot::{OpenProtocolAttributes, OpenProtocolParams, SearchType};
use crate::Identify;
#[cfg(feature = "alloc")]
use {
crate::proto::device_path::text::{AllowShortcuts, DevicePathToText, DisplayOnly},
crate::table::boot::{
BootServices, OpenProtocolAttributes, OpenProtocolParams, ScopedProtocol, SearchType,
},
crate::{CString16, Identify},
alloc::borrow::ToOwned,
alloc::boxed::Box,
};

opaque_type! {
/// Opaque type that should be used to represent a pointer to a
Expand Down Expand Up @@ -807,6 +810,7 @@ impl core::error::Error for DevicePathToTextError {

/// Helper function to open the [`DevicePathToText`] protocol using the boot
/// services.
#[cfg(feature = "alloc")]
fn open_text_protocol(
bs: &BootServices,
) -> Result<ScopedProtocol<DevicePathToText>, DevicePathToTextError> {
Expand Down
3 changes: 2 additions & 1 deletion uefi/src/table/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use super::Revision;
use crate::table::boot::MemoryDescriptor;
use crate::{CStr16, Error, Guid, Result, Status, StatusExt};
use crate::{CStr16, Error, Result, Status, StatusExt};
use core::fmt::{Debug, Formatter};
use core::mem::MaybeUninit;
use core::{fmt, ptr};
Expand All @@ -15,6 +15,7 @@ pub use uefi_raw::time::Daylight;
#[cfg(feature = "alloc")]
use {
crate::data_types::FromSliceWithNulError,
crate::Guid,
alloc::boxed::Box,
alloc::{vec, vec::Vec},
core::mem,
Expand Down