Skip to content

Commit 4f56978

Browse files
committed
multiboot2: Get a mutable reference to the basic memory information tag
1 parent 2b62224 commit 4f56978

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

multiboot2/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,11 @@ impl<T: AsRef<BootInformationInner> + AsMut<BootInformationInner>> BootInformati
519519
self.get_tag_mut::<MemoryMapTag, _>(TagType::Mmap)
520520
}
521521

522+
/// Search for the basic memory info tag, return a mutable reference.
523+
pub fn basic_memory_info_tag_mut(&mut self) -> Option<&mut BasicMemoryInfoTag> {
524+
self.get_tag_mut::<BasicMemoryInfoTag, _>(TagType::BasicMeminfo)
525+
}
526+
522527
fn get_tag_mut<TagT: TagTrait + ?Sized, TagType: Into<TagTypeId>>(
523528
&mut self,
524529
typ: TagType,

0 commit comments

Comments
 (0)