Skip to content

Commit 65730ef

Browse files
committed
multiboot2: move EFIBootServicesNotExitedTag to efi module
This change is not breaking as this path change is publicly not visible.
1 parent 2cf6266 commit 65730ef

File tree

3 files changed

+36
-34
lines changed

3 files changed

+36
-34
lines changed

multiboot2/src/efi.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,37 @@ impl TagTrait for EFIImageHandle64Tag {
131131
fn dst_size(_base_tag: &Tag) {}
132132
}
133133

134+
/// EFI ExitBootServices was not called tag.
135+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
136+
#[repr(C)]
137+
pub struct EFIBootServicesNotExitedTag {
138+
typ: TagTypeId,
139+
size: u32,
140+
}
141+
142+
impl EFIBootServicesNotExitedTag {
143+
#[cfg(feature = "builder")]
144+
pub fn new() -> Self {
145+
Self::default()
146+
}
147+
}
148+
149+
#[cfg(feature = "builder")]
150+
impl Default for EFIBootServicesNotExitedTag {
151+
fn default() -> Self {
152+
Self {
153+
typ: TagType::EfiBs.into(),
154+
size: core::mem::size_of::<Self>().try_into().unwrap(),
155+
}
156+
}
157+
}
158+
159+
impl TagTrait for EFIBootServicesNotExitedTag {
160+
const ID: TagType = TagType::EfiBs;
161+
162+
fn dst_size(_base_tag: &Tag) {}
163+
}
164+
134165
#[cfg(all(test, feature = "builder"))]
135166
mod tests {
136167
use super::{EFIImageHandle32Tag, EFIImageHandle64Tag, EFISdt32Tag, EFISdt64Tag};

multiboot2/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,18 @@ mod vbe_info;
6767

6868
pub use boot_loader_name::BootLoaderNameTag;
6969
pub use command_line::CommandLineTag;
70-
pub use efi::{EFIImageHandle32Tag, EFIImageHandle64Tag, EFISdt32Tag, EFISdt64Tag};
70+
pub use efi::{
71+
EFIBootServicesNotExitedTag, EFIImageHandle32Tag, EFIImageHandle64Tag, EFISdt32Tag, EFISdt64Tag,
72+
};
7173
pub use elf_sections::{
7274
ElfSection, ElfSectionFlags, ElfSectionIter, ElfSectionType, ElfSectionsTag,
7375
};
7476
pub use end::EndTag;
7577
pub use framebuffer::{FramebufferColor, FramebufferField, FramebufferTag, FramebufferType};
7678
pub use image_load_addr::ImageLoadPhysAddrTag;
7779
pub use memory_map::{
78-
BasicMemoryInfoTag, EFIBootServicesNotExitedTag, EFIMemoryAreaType, EFIMemoryDesc,
79-
EFIMemoryMapTag, MemoryArea, MemoryAreaType, MemoryAreaTypeId, MemoryMapTag,
80+
BasicMemoryInfoTag, EFIMemoryAreaType, EFIMemoryDesc, EFIMemoryMapTag, MemoryArea,
81+
MemoryAreaType, MemoryAreaTypeId, MemoryMapTag,
8082
};
8183
pub use module::{ModuleIter, ModuleTag};
8284
pub use ptr_meta::Pointee;

multiboot2/src/memory_map.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -334,37 +334,6 @@ impl TagTrait for EFIMemoryMapTag {
334334
}
335335
}
336336

337-
/// EFI ExitBootServices was not called tag.
338-
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
339-
#[repr(C)]
340-
pub struct EFIBootServicesNotExitedTag {
341-
typ: TagTypeId,
342-
size: u32,
343-
}
344-
345-
impl EFIBootServicesNotExitedTag {
346-
#[cfg(feature = "builder")]
347-
pub fn new() -> Self {
348-
Self::default()
349-
}
350-
}
351-
352-
#[cfg(feature = "builder")]
353-
impl Default for EFIBootServicesNotExitedTag {
354-
fn default() -> Self {
355-
Self {
356-
typ: TagType::EfiBs.into(),
357-
size: mem::size_of::<Self>().try_into().unwrap(),
358-
}
359-
}
360-
}
361-
362-
impl TagTrait for EFIBootServicesNotExitedTag {
363-
const ID: TagType = TagType::EfiBs;
364-
365-
fn dst_size(_base_tag: &Tag) {}
366-
}
367-
368337
/// An iterator over ALL EFI memory areas.
369338
#[derive(Clone, Debug)]
370339
pub struct EFIMemoryAreaIter<'a> {

0 commit comments

Comments
 (0)