Move KernelProtocol trait to kernel-protocol feature
This commit is contained in:
parent
24561381fc
commit
daa376a583
@ -1,4 +1,8 @@
|
||||
|
||||
pub trait KernelProtocol: Sized {
|
||||
const KERNEL_MAGIC: [u8; 8];
|
||||
}
|
||||
|
||||
#[cfg(feature = "kernel-protocol")]
|
||||
impl KernelProtocol for ProtoV1 {
|
||||
const KERNEL_MAGIC: [u8; 8] = [
|
||||
|
@ -12,6 +12,10 @@ pub mod v1;
|
||||
pub use v1::ProtoV1;
|
||||
pub use video::VideoInfo;
|
||||
pub use mmap::MemoryMapInfo;
|
||||
#[cfg(feature = "load-protocol")]
|
||||
pub use load::LoadProtocol;
|
||||
#[cfg(feature = "kernel-protocol")]
|
||||
pub use kernel::KernelProtocol;
|
||||
|
||||
pub const FLAG_VIDEO: u32 = 1 << 0;
|
||||
pub const FLAG_INITRD: u32 = 1 << 1;
|
||||
@ -22,10 +26,6 @@ pub enum Error {
|
||||
Error
|
||||
}
|
||||
|
||||
pub trait KernelProtocol: Sized {
|
||||
const KERNEL_MAGIC: [u8; 8];
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct Header {
|
||||
pub kernel_magic: [u8; 8],
|
||||
|
Loading…
x
Reference in New Issue
Block a user