fn multiboot_header(
    hdr: &[u8],
    offset: u64,
    kernel_file_len: u64
) -> Result<Option<MultibootKernel>>
Expand description

Attempt to parse a Multiboot header from the prefix of a slice.

§Returns

  • Ok(None): no multiboot header here.
  • Ok(Some(...)): valid multiboot header is returned.
  • Err(...): valid multiboot header checksum at this position in the file (meaning this is the real header location), but there is an invalid field later in the multiboot header (e.g. an impossible combination of load addresses).