Remove CRLF bodge

This commit is contained in:
August 2025-10-02 01:08:40 -04:00
parent 249c1ae92c
commit 50322be602
Signed by: shibedrill
GPG Key ID: 5FE0CB25945EFAA2
3 changed files with 3 additions and 8 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) 2025 shibedrill
// SPDX-License-Identifier: GPL-3.0-or-later
use crate::constants::NEWLINE;
use crate::format;
use crate::memory::alloc::string::String;
use crate::{LOGGER, LogLevel, log_trace};
@ -27,8 +26,7 @@ lazy_static! {
pub fn log_modules() {
if !MODULE_RESPONSE.modules().is_empty() {
let mut log_msg: String = String::from("Kernel modules list:");
log_msg.push_str(NEWLINE);
let mut log_msg: String = String::from("Kernel modules list:\n");
for module in MODULE_RESPONSE.modules() {
log_msg.push_str(&format!(
"\t{}",

View File

@ -8,8 +8,6 @@ use crate::format;
use crate::log::LogLevel;
use crate::memory::alloc::string::String;
pub static NEWLINE: &str = "\r\n";
#[bitflags]
#[repr(u8)]
#[derive(Debug, Clone, Copy)]

View File

@ -3,7 +3,6 @@
use crate::boot::modules::MODULE_RESPONSE;
use crate::boot::params::EXECUTABLE_FILE_RESPONSE;
use crate::constants::NEWLINE;
use crate::{LOGGER, LogLevel, format, log_info, log_trace};
use alloc::string::String;
use free_list::{AllocError, FreeList, PAGE_SIZE, PageRange};
@ -121,7 +120,7 @@ pub fn log_memory() {
let mut unusable: u64 = 0;
for entry in MEMMAP_RESPONSE.entries() {
log_msg.push_str(&format!(
"{NEWLINE}\t0x{:x} bytes ({} pages) @ 0x{:x}: {}",
"\n\t0x{:x} bytes ({} pages) @ 0x{:x}: {}",
entry.length,
entry.length as usize / PAGE_SIZE,
entry.base,
@ -166,7 +165,7 @@ pub fn log_memory() {
log_trace!("{log_msg}");
let total = usable + reclaimable + hardware + unusable;
log_info!(
"Memory report: {NEWLINE}\tFree: 0x{usable:x}{NEWLINE}\tAvailable: 0x{reclaimable:x}{NEWLINE}\tUsable: 0x{:x}{NEWLINE}\tHardware: 0x{hardware:x}{NEWLINE}\tUnusable: 0x{unusable:x}{NEWLINE}\tTotal: 0x{total:x}",
"Memory report: \n\tFree: 0x{usable:x}\n\tAvailable: 0x{reclaimable:x}\n\tUsable: 0x{:x}\n\tHardware: 0x{hardware:x}\n\tUnusable: 0x{unusable:x}\n\tTotal: 0x{total:x}",
usable + reclaimable,
);
log_trace!("Deallocating available memory...");