Skip to content

Commit 01c33d5

Browse files
committed
multiboot2: misc
1 parent d8804ec commit 01c33d5

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

multiboot2-header/src/entry_address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Debug for EntryAddressHeaderTag {
5353
.field("type", &self.typ())
5454
.field("flags", &self.flags())
5555
.field("size", &self.size())
56-
.field("entry_addr", &(self.entry_addr as *const u32))
56+
.field("entry_addr", &self.entry_addr)
5757
.finish()
5858
}
5959
}

multiboot2-header/src/entry_efi_32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Debug for EntryEfi32HeaderTag {
6262
.field("type", &self.typ())
6363
.field("flags", &self.flags())
6464
.field("size", &self.size())
65-
.field("entry_addr", &(self.entry_addr as *const u32))
65+
.field("entry_addr", &self.entry_addr)
6666
.finish()
6767
}
6868
}

multiboot2-header/src/entry_efi_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Debug for EntryEfi64HeaderTag {
6262
.field("type", &self.typ())
6363
.field("flags", &self.flags())
6464
.field("size", &self.size())
65-
.field("entry_addr", &(self.entry_addr as *const u32))
65+
.field("entry_addr", &self.entry_addr)
6666
.finish()
6767
}
6868
}

multiboot2-header/src/relocatable.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ impl Debug for RelocatableHeaderTag {
108108
.field("flags", &self.flags())
109109
.field("size", &self.size())
110110
// trick to print this as hexadecimal pointer
111-
.field("min_addr", &(self.min_addr as *const u32))
112-
.field("max_addr", &(self.max_addr as *const u32))
113-
.field("align", &{ self.align })
114-
.field("preference", &{ self.preference })
111+
.field("min_addr", &self.min_addr)
112+
.field("max_addr", &self.max_addr)
113+
.field("align", &self.align)
114+
.field("preference", &self.preference)
115115
.finish()
116116
}
117117
}

multiboot2/src/boot_information.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ impl<'a> BootInformation<'a> {
132132

133133
/// Get the start address of the boot info.
134134
#[must_use]
135+
// TODO deprecated and use pointers only (see provenance discussions)
135136
pub fn start_address(&self) -> usize {
136137
self.as_ptr() as usize
137138
}
@@ -153,6 +154,7 @@ impl<'a> BootInformation<'a> {
153154
/// let end_addr = boot_info.start_address() + boot_info.total_size();
154155
/// ```
155156
#[must_use]
157+
// TODO deprecated and use pointers only (see provenance discussions)
156158
pub fn end_address(&self) -> usize {
157159
self.start_address() + self.total_size()
158160
}

0 commit comments

Comments
 (0)