Skip to content

Commit f610213

Browse files
committed
multiboot2: Get a mutable reference to the basic memory information tag
1 parent ca33794 commit f610213

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
@@ -520,6 +520,11 @@ impl<T: AsRef<BootInformationInner> + AsMut<BootInformationInner>> BootInformati
520520
self.get_tag_mut::<MemoryMapTag, _>(TagType::Mmap)
521521
}
522522

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

0 commit comments

Comments
 (0)