diff --git a/uefi-raw/src/table/boot.rs b/uefi-raw/src/table/boot.rs index 10ce25d08..a6e40cedd 100644 --- a/uefi-raw/src/table/boot.rs +++ b/uefi-raw/src/table/boot.rs @@ -3,6 +3,13 @@ use crate::{PhysicalAddress, VirtualAddress}; use bitflags::bitflags; +newtype_enum! { +/// Interface type of a protocol interface. +pub enum InterfaceType: u32 => { + /// Native interface + NATIVE_INTERFACE = 0, +}} + bitflags! { /// Flags describing the capabilities of a memory range. #[repr(transparent)] diff --git a/uefi/src/table/boot.rs b/uefi/src/table/boot.rs index 8e51ef69c..7a00108b2 100644 --- a/uefi/src/table/boot.rs +++ b/uefi/src/table/boot.rs @@ -20,7 +20,9 @@ use { ::alloc::vec::Vec, }; -pub use uefi_raw::table::boot::{MemoryAttribute, MemoryDescriptor, MemoryType, Tpl}; +pub use uefi_raw::table::boot::{ + InterfaceType, MemoryAttribute, MemoryDescriptor, MemoryType, Tpl, +}; // TODO: this similar to `SyncUnsafeCell`. Once that is stabilized we // can use it instead. @@ -2139,16 +2141,6 @@ impl<'a> HandleBuffer<'a> { } } -newtype_enum! { -/// Interface type of a protocol interface -/// -/// Only has one variant when this was written (v2.10 of the UEFI spec) -pub enum InterfaceType: i32 => { - /// Native interface - NATIVE_INTERFACE = 0, -} -} - /// Opaque pointer returned by [`BootServices::register_protocol_notify`] to be used /// with [`BootServices::locate_handle`] via [`SearchType::ByRegisterNotify`]. #[derive(Debug, Clone, Copy)]