Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Burn down a TODO about modinfo name now that we have const fns #75

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ macro_rules! kernel_module {
#[link_section = ".modinfo"]
#[allow(non_upper_case_globals)]
// TODO: Generate a name the same way the kernel's `__MODULE_INFO` does.
// TODO: This needs to be a `&'static [u8]`, since the kernel defines this as a
// `const char []`.
pub static $name: &'static str = concat!(stringify!($name), "=", $value);
pub static $name: &'static [u8] = concat!(stringify!($name), "=", $value, '\0').as_bytes();
};
}

Expand Down
1 change: 1 addition & 0 deletions tests/sysctl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![feature(const_str_as_bytes)]

use core::sync::atomic::AtomicBool;

Expand Down