Skip to content

Commit fa073c0

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 0c533bd commit fa073c0

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
@@ -25,7 +25,7 @@ pub use uefi_raw::table::boot::{
2525

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

3030
/// Size in bytes of a UEFI page.
3131
///
@@ -1602,7 +1602,7 @@ impl Align for MemoryDescriptor {
16021602
/// If the memory map changes, this value is no longer valid.
16031603
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
16041604
#[repr(C)]
1605-
pub struct MemoryMapKey(usize);
1605+
pub struct MemoryMapKey(pub(crate) usize);
16061606

16071607
/// A structure containing the size of a memory descriptor and the size of the
16081608
/// memory map.
@@ -1624,10 +1624,10 @@ pub struct MemoryMapSize {
16241624
/// map, you manually have to call [`MemoryMap::sort`] first.
16251625
#[derive(Debug)]
16261626
pub struct MemoryMap<'buf> {
1627-
key: MemoryMapKey,
1628-
buf: &'buf mut [u8],
1629-
entry_size: usize,
1630-
len: usize,
1627+
pub(crate) key: MemoryMapKey,
1628+
pub(crate) buf: &'buf mut [u8],
1629+
pub(crate) entry_size: usize,
1630+
pub(crate) len: usize,
16311631
}
16321632

16331633
impl<'buf> MemoryMap<'buf> {
@@ -1839,7 +1839,8 @@ impl<'guid> SearchType<'guid> {
18391839
}
18401840

18411841
/// Raw event notification function
1842-
type EventNotifyFn = unsafe extern "efiapi" fn(event: Event, context: Option<NonNull<c_void>>);
1842+
pub(crate) type EventNotifyFn =
1843+
unsafe extern "efiapi" fn(event: Event, context: Option<NonNull<c_void>>);
18431844

18441845
/// Timer events manipulation.
18451846
#[derive(Debug)]
@@ -1938,7 +1939,7 @@ impl<'a> HandleBuffer<'a> {
19381939
/// with [`BootServices::locate_handle`] via [`SearchType::ByRegisterNotify`].
19391940
#[derive(Debug, Clone, Copy)]
19401941
#[repr(transparent)]
1941-
pub struct ProtocolSearchKey(NonNull<c_void>);
1942+
pub struct ProtocolSearchKey(pub(crate) NonNull<c_void>);
19421943

19431944
#[cfg(test)]
19441945
mod tests {

0 commit comments

Comments
 (0)