Skip to content

Commit

Permalink
[contrib] E: Updating Build System
Browse files Browse the repository at this point in the history
  • Loading branch information
ppenna committed Aug 11, 2024
1 parent 95619ab commit f42d609
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build
3 changes: 1 addition & 2 deletions src/kmain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
#![forbid(clippy::large_stack_frames)]
#![forbid(clippy::large_stack_arrays)]
#![feature(allocator_api)] // kheap uses this.
#![feature(panic_info_message)] // kpanic uses this.
#![feature(ptr_sub_ptr)] // slab uses this.
#![feature(pointer_is_aligned)] // mboot uses this.
#![feature(pointer_is_aligned_to)] // mboot uses this.
#![feature(asm_const)] // gdt uses this.
#![feature(const_mut_refs)] // tss uses this.
#![feature(linked_list_remove)] // vmem uses this.
Expand Down
14 changes: 6 additions & 8 deletions src/kpanic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ use crate::klog::{
use ::core::{
fmt::Write,
hint,
panic::PanicInfo,
panic::{
PanicInfo,
PanicMessage,
},
};

//==================================================================================================
Expand Down Expand Up @@ -40,13 +43,8 @@ pub fn kpanic(info: &PanicInfo) -> ! {
};

// Print panic information.
if let Some(m) = info.message() {
let _ = write!(klog, "file='{}', line={} :: {}", file, line, m);
} else if let Some(m) = info.payload().downcast_ref::<&str>() {
let _ = write!(klog, "file='{}', line={} :: {}", file, line, m);
} else {
let _ = write!(klog, "file='{}', line={} :: ?", file, line);
}
let m: PanicMessage = info.message();
let _ = write!(klog, "file='{}', line={} :: {}", file, line, m);
}

loop {
Expand Down

0 comments on commit f42d609

Please sign in to comment.