Skip to content

Commit 1272d85

Browse files
committed
multiboot2: Get a mutable reference to the basic memory information tag
1 parent 7f858b1 commit 1272d85

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

multiboot2/src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,13 @@ impl<'a> BootInformation<'a> {
285285
self.get_tag::<BasicMemoryInfoTag, _>(TagType::BasicMeminfo)
286286
}
287287

288+
/// Search for the basic memory info tag, return a mutable reference.
289+
pub fn basic_memory_info_tag_mut<'b: 'a>(&'b mut self) -> Option<&'b mut BasicMemoryInfoTag> {
290+
self.get_tag_mut::<BasicMemoryInfoTag, _>(TagType::BasicMeminfo)
291+
}
292+
288293
/// Returns an [`ElfSectionIter`] iterator over the ELF Sections, if the
289294
/// [`ElfSectionsTag`] is present.
290-
///
291295
/// # Examples
292296
///
293297
/// ```rust,no_run

0 commit comments

Comments
 (0)