Skip to content

Commit 2b385a0

Browse files
committed
multiboot2: Get a mutable reference to the basic memory information tag
1 parent 2c9f744 commit 2b385a0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

multiboot2/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,11 @@ impl<T: AsRef<BootInformationInner> + AsMut<BootInformationInner>> BootInformati
515515
self.get_tag_mut::<MemoryMapTag, _>(TagType::Mmap)
516516
}
517517

518+
/// Search for the basic memory info tag, return a mutable reference.
519+
pub fn basic_memory_info_tag_mut(&mut self) -> Option<&mut BasicMemoryInfoTag> {
520+
self.get_tag_mut::<BasicMemoryInfoTag, _>(TagType::BasicMeminfo)
521+
}
522+
518523
fn get_tag_mut<TagT: TagTrait + ?Sized, TagType: Into<TagTypeId>>(
519524
&mut self,
520525
typ: TagType,

0 commit comments

Comments
 (0)