Formatting changes, called 'cargo fmt'

This commit is contained in:
2025-02-22 03:09:46 +00:00
parent 34213ca744
commit f5f5aeb8dc
10 changed files with 17 additions and 29 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
use cc;
use std::process::Command;
use std::{env, path::Path};
use cc;
fn main() {
// Tell cargo to rerun if these files change
println!("cargo:rerun-if-changed=src");
println!("cargo:rerun-if-changed=linker.ld");
println!("cargo:rerun-if-changed=../config/limine.conf");
}
}
+1 -1
View File
@@ -1 +1 @@
pub mod x86_64;
pub mod x86_64;
+1 -5
View File
@@ -9,14 +9,10 @@ static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
idt
});
pub fn init_idt() {
IDT.load();
}
extern "x86-interrupt" fn breakpoint_handler(
stack_frame: InterruptStackFrame
) {
extern "x86-interrupt" fn breakpoint_handler(stack_frame: InterruptStackFrame) {
println_log!("Exception: Breakpoint\n{:#?}", stack_frame);
}
+1 -1
View File
@@ -1 +1 @@
pub mod interrupts;
pub mod interrupts;
+3 -7
View File
@@ -1,19 +1,17 @@
#![no_std]
#![feature(abi_x86_interrupt)]
use core::arch::asm;
use limine::request::{RequestsEndMarker, RequestsStartMarker};
use limine::BaseRevision;
pub use lib_serial::{serial_print, serial_println, serial_read};
pub use lib_ascii::{print, print_log, println, println_log, WRITER};
pub use lib_serial::{serial_print, serial_println, serial_read};
mod arch;
use lib_framebuffer;
/// Sets the base revision to the latest revision supported by the crate.
/// See specification for further info.
/// Be sure to mark all limine requests with #[used], otherwise they may be removed by the compiler.
@@ -49,14 +47,12 @@ pub fn hcf() -> ! {
}
pub fn boot() -> Result<(), &'static str> {
if !BASE_REVISION.is_supported() {
return Err("base revision not supported");
}
lib_serial::init()?;
arch::x86_64::interrupts::init_idt();
Ok(())
}
}
+5 -9
View File
@@ -1,9 +1,7 @@
#![no_std]
#![no_main]
use FoundryOS::{
println, println_log
};
use FoundryOS::{println, println_log};
#[no_mangle]
unsafe extern "C" fn kmain() -> ! {
@@ -21,7 +19,8 @@ unsafe extern "C" fn kmain() -> ! {
println!("Dimensions: {}x{} (px)", dimensions2.0, dimensions2.1);
println!("Dimensions: {}x{} (chars)", dimensions.0, dimensions.1);
println!("
println!(
"
$$$$$$$$\\ $$\\
$$ _____| $$ |
$$ | $$$$$$\\ $$\\ $$\\ $$$$$$$\\ $$$$$$$ | $$$$$$\\ $$\\ $$\\
@@ -38,11 +37,8 @@ unsafe extern "C" fn kmain() -> ! {
$$ | $$ |$$\\ $$ | \\$$$ / $$ |
$$$$$$ |\\$$$$$$ | \\$ / $$$$$$\\
\\______/ \\______/ \\_/ \\______|
");
"
);
FoundryOS::hcf();
}