Skip to content

Commit 42b3059

Browse files
committed
multiboot2: Get a mutable reference to the basic memory information tag
1 parent 12b74ed commit 42b3059

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

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

0 commit comments

Comments
 (0)