Skip to content

Commit e8ceeaa

Browse files
x86_64: limine-rs API updates
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent d6e2567 commit e8ceeaa

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/aero_kernel/src/arch/x86_64/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ extern "C" fn x86_64_aero_main() -> ! {
125125
// setup the debug renderer.
126126
//
127127
// SAFETY: The `cmdline` is a valid, aligned, and NULL terminated string.
128-
let command_line = unsafe { kernel_file.cmdline.to_str() }.expect("limine: bad command line");
128+
let command_line = kernel_file
129+
.cmdline
130+
.to_str()
131+
.expect("limine: bad command line");
129132
let command_line = cmdline::parse(
130133
command_line.to_str().expect("cmdline: invalid utf8"),
131134
modules,
@@ -177,7 +180,7 @@ extern "C" fn x86_64_aero_main() -> ! {
177180
crate::INITRD_MODULE.call_once(|| {
178181
modules
179182
.iter()
180-
.find(|e| unsafe { e.cmdline.to_str().unwrap() }.to_str().unwrap() == "initramfs")
183+
.find(|e| e.cmdline.to_str().unwrap().to_str().unwrap() == "initramfs")
181184
.unwrap()
182185
});
183186

src/aero_kernel/src/cmdline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn resolve_module(modules: &[NonNullPtr<LimineFile>], name: &str) -> &'static [u
3131
modules
3232
.iter()
3333
.find(|m| {
34-
let n = unsafe { m.cmdline.to_str().unwrap().to_str().unwrap() };
34+
let n = m.cmdline.to_str().unwrap().to_str().unwrap();
3535
n == name
3636
})
3737
.map(|m| unsafe {

0 commit comments

Comments
 (0)