Skip to content

Commit 3474333

Browse files
committed
Remove BootInfo::package
The feature was not implemented.
1 parent 9a69b0e commit 3474333

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/bootinfo/mod.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,12 @@ mod memory_map;
1010
#[repr(C)]
1111
pub struct BootInfo {
1212
pub memory_map: MemoryMap,
13-
pub package: Package,
14-
}
15-
16-
#[derive(Debug)]
17-
#[repr(C)]
18-
pub struct Package {
19-
ptr: *const u8,
20-
len: u64,
21-
}
22-
23-
impl Deref for Package {
24-
type Target = [u8];
25-
fn deref(&self) -> &[u8] {
26-
unsafe { slice::from_raw_parts(self.ptr, self.len as usize) }
27-
}
2813
}
2914

3015
impl BootInfo {
31-
pub fn new(memory_map: MemoryMap, package: &'static [u8]) -> Self {
16+
pub fn new(memory_map: MemoryMap) -> Self {
3217
BootInfo {
3318
memory_map,
34-
package: Package {
35-
ptr: package.as_ptr(),
36-
len: package.len() as u64,
37-
},
3819
}
3920
}
4021
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn load_elf(
223223
};
224224

225225
// Construct boot info structure.
226-
let mut boot_info = BootInfo::new(memory_map, &[]);
226+
let mut boot_info = BootInfo::new(memory_map);
227227
boot_info.memory_map.sort();
228228

229229
// Write boot info to boot info page.

0 commit comments

Comments
 (0)