浏览代码

Rename the Multiboot type to BootInformation

Philipp Oppermann 9 年之前
父节点
当前提交
5d88147bd2
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/lib.rs

+ 4 - 4
src/lib.rs

@@ -7,20 +7,20 @@ pub use memory_map::{MemoryMapTag, MemoryArea, MemoryAreaIter};
 mod elf_sections;
 mod memory_map;
 
-pub unsafe fn load(address: usize) -> &'static Multiboot {
-    let multiboot = &*(address as *const Multiboot);
+pub unsafe fn load(address: usize) -> &'static BootInformation {
+    let multiboot = &*(address as *const BootInformation);
     assert!(multiboot.has_valid_end_tag());
     multiboot
 }
 
 #[repr(C)]
-pub struct Multiboot {
+pub struct BootInformation {
     pub total_size: u32,
     _reserved: u32,
     first_tag: Tag,
 }
 
-impl Multiboot {
+impl BootInformation {
     pub fn elf_sections_tag(&self) -> Option<&'static ElfSectionsTag> {
         self.get_tag(9).map(|tag| unsafe{&*(tag as *const Tag as *const ElfSectionsTag)})
     }