Skip to content

Printk improvements #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: rust
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/kernel/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub use crate::types::{Mode, ScopeGuard};
pub const PAGE_SIZE: usize = 1 << bindings::PAGE_SHIFT;

/// Prefix to appear before log messages printed from within the kernel crate.
const __LOG_PREFIX: &[u8] = b"rust_kernel\0";
const __LOG_PREFIX: &str::CStr = c_str!("rust_kernel");

/// The top level entrypoint to implementing a kernel module.
///
Expand Down
4 changes: 4 additions & 0 deletions rust/kernel/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ pub use super::static_assert;
pub use super::{Error, KernelModule, Result};

pub use crate::traits::TryPin;

// Default log prefix to none so crates without `module!` can use printk macros.
#[doc(hidden)]
pub const __LOG_PREFIX: () = ();
Loading