Skip to content

Commit 0c197f0

Browse files
uefi: Make some data in the uefi::table::boot module pub(crate)
This will allow some code to be shared with the upcoming `uefi::boot` module.
1 parent 1fa9408 commit 0c197f0

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

uefi/src/table/boot.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub use uefi_raw::table::boot::{
2626

2727
/// Global image handle. This is only set by `BootServices::set_image_handle`,
2828
/// and it is only read by `BootServices::image_handle`.
29-
static IMAGE_HANDLE: AtomicPtr<c_void> = AtomicPtr::new(ptr::null_mut());
29+
pub(crate) static IMAGE_HANDLE: AtomicPtr<c_void> = AtomicPtr::new(ptr::null_mut());
3030

3131
/// Size in bytes of a UEFI page.
3232
///
@@ -1636,7 +1636,7 @@ impl Align for MemoryDescriptor {
16361636
/// If the memory map changes, this value is no longer valid.
16371637
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
16381638
#[repr(C)]
1639-
pub struct MemoryMapKey(usize);
1639+
pub struct MemoryMapKey(pub(crate) usize);
16401640

16411641
/// The backing memory for the UEFI memory app on the UEFI heap, allocated using
16421642
/// the UEFI boot services allocator. This occupied memory will also be
@@ -2064,10 +2064,10 @@ impl IndexMut<usize> for MemoryMapRefMut<'_> {
20642064
#[derive(Debug)]
20652065
pub struct MemoryMapOwned {
20662066
/// Backing memory, properly initialized at this point.
2067-
buf: MemoryMapBackingMemory,
2068-
key: MemoryMapKey,
2069-
meta: MemoryMapMeta,
2070-
len: usize,
2067+
pub(crate) buf: MemoryMapBackingMemory,
2068+
pub(crate) key: MemoryMapKey,
2069+
pub(crate) meta: MemoryMapMeta,
2070+
pub(crate) len: usize,
20712071
}
20722072

20732073
impl MemoryMapOwned {
@@ -2210,7 +2210,8 @@ impl<'guid> SearchType<'guid> {
22102210
}
22112211

22122212
/// Raw event notification function
2213-
type EventNotifyFn = unsafe extern "efiapi" fn(event: Event, context: Option<NonNull<c_void>>);
2213+
pub(crate) type EventNotifyFn =
2214+
unsafe extern "efiapi" fn(event: Event, context: Option<NonNull<c_void>>);
22142215

22152216
/// Timer events manipulation.
22162217
#[derive(Debug)]
@@ -2309,7 +2310,7 @@ impl<'a> HandleBuffer<'a> {
23092310
/// with [`BootServices::locate_handle`] via [`SearchType::ByRegisterNotify`].
23102311
#[derive(Debug, Clone, Copy)]
23112312
#[repr(transparent)]
2312-
pub struct ProtocolSearchKey(NonNull<c_void>);
2313+
pub struct ProtocolSearchKey(pub(crate) NonNull<c_void>);
23132314

23142315
#[cfg(test)]
23152316
mod tests_mmap_artificial {

0 commit comments

Comments
 (0)