Skip to content
Merged
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ overflow-checks = false
# duplicated from `bios/stage-2/Cargo.toml`
[profile.stage-2]
inherits = "release"
opt-level = "s"
opt-level = "z"
codegen-units = 1
debug = false
overflow-checks = true
Expand Down
2 changes: 1 addition & 1 deletion bios/stage-2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bootloader-x86_64-bios-common = { workspace = true }
# See https://github.com/rust-lang/cargo/issues/8264 for details.
[profile.stage-2]
inherits = "release"
opt-level = "s"
opt-level = "z"
codegen-units = 1
debug = false
overflow-checks = true
8 changes: 5 additions & 3 deletions bios/stage-2/src/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ pub struct DiskAccess {
}

impl Read for DiskAccess {
unsafe fn read_exact(&mut self, len: usize) -> &[u8] {
let current_sector_offset = usize::try_from(self.current_offset % 512).unwrap();
unsafe fn read_exact_at(&mut self, len: usize, offset: u64) -> &[u8] {
self.seek(SeekFrom::Start(offset - (offset % 512)));
let current_sector_offset = usize::try_from(offset % 512).unwrap();

static mut TMP_BUF: AlignedArrayBuffer<1024> = AlignedArrayBuffer {
buffer: [0; 512 * 2],
Expand Down Expand Up @@ -62,6 +63,7 @@ impl Seek for DiskAccess {
fn seek(&mut self, pos: SeekFrom) -> u64 {
match pos {
SeekFrom::Start(offset) => {
assert_eq!(offset % 512, 0);
self.current_offset = offset;
self.current_offset
}
Expand All @@ -70,7 +72,7 @@ impl Seek for DiskAccess {
}

pub trait Read {
unsafe fn read_exact(&mut self, len: usize) -> &[u8];
unsafe fn read_exact_at(&mut self, len: usize, offset: u64) -> &[u8];
fn read_exact_into(&mut self, len: usize, buf: &mut dyn AlignedBuffer);
}

Expand Down
20 changes: 8 additions & 12 deletions bios/stage-2/src/fat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ struct Bpb {
}

impl Bpb {
fn parse<D: Read + Seek>(disk: &mut D) -> Self {
disk.seek(SeekFrom::Start(0));
let raw = unsafe { disk.read_exact(512) };
fn parse<D: Read>(disk: &mut D) -> Self {
let raw = unsafe { disk.read_exact_at(512, 0) };

let bytes_per_sector = u16::from_le_bytes(raw[11..13].try_into().unwrap());
let sectors_per_cluster = raw[13];
Expand Down Expand Up @@ -256,7 +255,7 @@ struct Traverser<'a, D> {

impl<D> Traverser<'_, D>
where
D: Read + Seek,
D: Read,
{
fn next_cluster(&mut self) -> Result<Option<Cluster>, ()> {
let entry = classify_fat_entry(
Expand Down Expand Up @@ -286,7 +285,7 @@ where

impl<D> Iterator for Traverser<'_, D>
where
D: Read + Seek,
D: Read,
{
type Item = Result<Cluster, ()>;

Expand Down Expand Up @@ -476,28 +475,25 @@ enum FileFatEntry {

fn fat_entry_of_nth_cluster<D>(disk: &mut D, fat_type: FatType, fat_start: u64, n: u32) -> u32
where
D: Seek + Read,
D: Read,
{
debug_assert!(n >= 2);
match fat_type {
FatType::Fat32 => {
let base = n as u64 * 4;
disk.seek(SeekFrom::Start(fat_start + base));
let buf = unsafe { disk.read_exact(4) };
let buf = unsafe { disk.read_exact_at(4, fat_start + base) };
let buf: [u8; 4] = buf.try_into().unwrap();
u32::from_le_bytes(buf) & 0x0FFFFFFF
}
FatType::Fat16 => {
let base = n as u64 * 2;
disk.seek(SeekFrom::Start(fat_start + base));
let buf = unsafe { disk.read_exact(2) };
let buf = unsafe { disk.read_exact_at(2, fat_start + base) };
let buf: [u8; 2] = buf.try_into().unwrap();
u16::from_le_bytes(buf) as u32
}
FatType::Fat12 => {
let base = n as u64 + (n as u64 / 2);
disk.seek(SeekFrom::Start(fat_start + base));
let buf = unsafe { disk.read_exact(2) };
let buf = unsafe { disk.read_exact_at(2, fat_start + base) };
let buf: [u8; 2] = buf.try_into().unwrap();
let entry16 = u16::from_le_bytes(buf);
if n & 1 == 0 {
Expand Down
4 changes: 0 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
);
}

#[cfg(not(docsrs_dummy_build))]

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 65 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "uefi")]
fn build_uefi_bootloader() -> PathBuf {
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
Expand Down Expand Up @@ -101,7 +101,7 @@

// dummy implementation because docsrs builds have no network access.
// This will put an empty file in out_dir and return its path.
#[cfg(docsrs_dummy_build)]

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 104 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "uefi")]
fn build_uefi_bootloader() -> PathBuf {
use std::fs::File;
Expand All @@ -120,7 +120,7 @@
path
}

#[cfg(not(docsrs_dummy_build))]

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 123 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_boot_sector() -> PathBuf {
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
Expand Down Expand Up @@ -166,7 +166,7 @@

// dummy implementation because docsrs builds have no network access.
// This will put an empty file in out_dir and return its path.
#[cfg(docsrs_dummy_build)]

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 169 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_boot_sector() -> PathBuf {
use std::fs::File;
Expand All @@ -185,7 +185,7 @@
path
}

#[cfg(not(docsrs_dummy_build))]

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 188 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_stage_2() -> PathBuf {
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
Expand Down Expand Up @@ -215,10 +215,6 @@
cmd.env_remove("RUSTFLAGS");
cmd.env_remove("CARGO_ENCODED_RUSTFLAGS");
cmd.env_remove("RUSTC_WORKSPACE_WRAPPER"); // used by clippy
cmd.env(
"RUSTFLAGS",
"-Csymbol-mangling-version=legacy -Zunstable-options",
);
let status = cmd
.status()
.expect("failed to run cargo install for bios second stage");
Expand All @@ -237,7 +233,7 @@

// dummy implementation because docsrs builds have no network access.
// This will put an empty file in out_dir and return its path.
#[cfg(docsrs_dummy_build)]

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 236 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_stage_2() -> PathBuf {
use std::fs::File;
Expand All @@ -256,7 +252,7 @@
path
}

#[cfg(not(docsrs_dummy_build))]

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 255 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_stage_3() -> PathBuf {
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
Expand Down Expand Up @@ -300,7 +296,7 @@

// dummy implementation because docsrs builds have no network access.
// This will put an empty file in out_dir and return its path.
#[cfg(docsrs_dummy_build)]

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 299 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_stage_3() -> PathBuf {
use std::fs::File;
Expand All @@ -319,7 +315,7 @@
path
}

#[cfg(not(docsrs_dummy_build))]

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 318 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_stage_4() -> PathBuf {
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
Expand Down Expand Up @@ -364,7 +360,7 @@

// dummy implementation because docsrs builds have no network access.
// This will put an empty file in out_dir and return its path.
#[cfg(docsrs_dummy_build)]

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Check

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Clippy

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`

Check warning on line 363 in build.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

unexpected `cfg` condition name: `docsrs_dummy_build`
#[cfg(feature = "bios")]
fn build_bios_stage_4() -> PathBuf {
use std::fs::File;
Expand Down
12 changes: 6 additions & 6 deletions examples/basic/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/test_kernels/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading