Skip to content

Update Rust toolchain to nightly-2020-10-01 #66

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

Merged
merged 6 commits into from
Oct 2, 2020
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: xenial
language: rust

rust:
- nightly-2020-03-01
- nightly-2020-10-01
env:
- RUSTFLAGS="-D warnings"

Expand Down
52 changes: 26 additions & 26 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ integration_tests = []

[dependencies]
bitflags = "1.2"
x86_64 = "0.11"
x86_64 = "0.12.2"
atomic_refcell = "0.1"
r-efi = "2.1.0"
uart_16550 = "0.2.7"
uart_16550 = "0.2.10"

[dev-dependencies]
rand = "0.7.3"
Expand Down
2 changes: 1 addition & 1 deletion run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -xeuf

source "${CARGO_HOME:-$HOME/.cargo}/env"

XBUILD_VERSION="0.5.34"
XBUILD_VERSION="0.6.2"
cargo install cargo-xbuild --version $XBUILD_VERSION

rustup component add rust-src
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2020-05-15
nightly-2020-10-01
8 changes: 5 additions & 3 deletions src/efi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,8 @@ pub fn efi_exec(
}
};

let mut stdin = console::STDIN;
let mut stdout = console::STDOUT;
let mut st = efi::SystemTable {
hdr: efi::TableHeader {
signature: efi::SYSTEM_TABLE_SIGNATURE,
Expand All @@ -741,11 +743,11 @@ pub fn efi_exec(
firmware_vendor: core::ptr::null_mut(), // TODO,
firmware_revision: 0,
console_in_handle: console::STDIN_HANDLE,
con_in: &mut console::STDIN,
con_in: &mut stdin,
console_out_handle: console::STDOUT_HANDLE,
con_out: &mut console::STDOUT,
con_out: &mut stdout,
standard_error_handle: console::STDERR_HANDLE,
std_err: &mut console::STDOUT,
std_err: &mut stdout,
runtime_services: &mut rs,
boot_services: &mut bs,
number_of_table_entries: 1,
Expand Down
16 changes: 8 additions & 8 deletions src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ fn default_entry_file(f: &mut fat::File) -> Result<[u8; 260], fat::Error> {

let conf = unsafe { core::str::from_utf8_unchecked(&data) };
for line in conf.lines() {
if line.starts_with("default") {
let entry = line["default".len()..].trim();
if let Some(entry) = line.strip_prefix("default") {
let entry = entry.trim();
entry_file_name[0..entry.len()].copy_from_slice(entry.as_bytes());
}
}
Expand All @@ -89,16 +89,16 @@ fn parse_entry(f: &mut fat::File) -> Result<LoaderConfig, fat::Error> {

let conf = unsafe { core::str::from_utf8_unchecked(&data) };
for line in conf.lines() {
if line.starts_with("linux") {
let entry = line["linux".len()..].trim();
if let Some(entry) = line.strip_prefix("linux") {
let entry = entry.trim();
loader_config.bzimage_path[0..entry.len()].copy_from_slice(entry.as_bytes());
}
if line.starts_with("options") {
let entry = line["options".len()..].trim();
if let Some(entry) = line.strip_prefix("options") {
let entry = entry.trim();
loader_config.cmdline[0..entry.len()].copy_from_slice(entry.as_bytes());
}
if line.starts_with("initrd") {
let entry = line["initrd".len()..].trim();
if let Some(entry) = line.strip_prefix("initrd") {
let entry = entry.trim();
loader_config.initrd_path[0..entry.len()].copy_from_slice(entry.as_bytes());
}
}
Expand Down