mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-10 13:56:48 +00:00
Fix format errors
This commit is contained in:
parent
63499c675c
commit
5941d3e6eb
@ -8,8 +8,8 @@ use crate::{
|
||||
arch::mm::{PageTableEntry, PageTableFlags},
|
||||
prelude::*,
|
||||
vm::{
|
||||
is_page_aligned, VmAllocOptions, VmFrame, VmFrameVec, VmReader, VmWriter,
|
||||
PHYS_MEM_BASE_VADDR, PAGE_SIZE,
|
||||
is_page_aligned, VmAllocOptions, VmFrame, VmFrameVec, VmReader, VmWriter, PAGE_SIZE,
|
||||
PHYS_MEM_BASE_VADDR,
|
||||
},
|
||||
Error,
|
||||
};
|
||||
|
@ -37,7 +37,7 @@ use crate::boot::memory_region::{MemoryRegion, MemoryRegionType};
|
||||
pub const PAGE_SIZE: usize = 0x1000;
|
||||
|
||||
/// The maximum virtual address of user space (non inclusive).
|
||||
///
|
||||
///
|
||||
/// Typicall 64-bit systems have at least 48-bit virtual address space.
|
||||
/// A typical way to reserve half of the address space for the kernel is
|
||||
/// to use the highest 48-bit virtual address space.
|
||||
@ -49,7 +49,7 @@ pub const PAGE_SIZE: usize = 0x1000;
|
||||
pub const MAX_USERSPACE_VADDR: Vaddr = 0x0000_8000_0000_0000 - PAGE_SIZE;
|
||||
|
||||
/// Start of the kernel address space.
|
||||
///
|
||||
///
|
||||
/// This is the _lowest_ address of the x86-64's _high_ canonical addresses.
|
||||
///
|
||||
/// This is also the base address of the direct mapping of all physical
|
||||
|
@ -40,7 +40,9 @@ fn work_in_workspace() {
|
||||
.open(&module_src_path)
|
||||
.unwrap();
|
||||
module_src_file
|
||||
.write_all(include_bytes!("work_in_workspace_templates/mymodule/src/lib.rs"))
|
||||
.write_all(include_bytes!(
|
||||
"work_in_workspace_templates/mymodule/src/lib.rs"
|
||||
))
|
||||
.unwrap();
|
||||
module_src_file.flush().unwrap();
|
||||
|
||||
@ -52,14 +54,20 @@ fn work_in_workspace() {
|
||||
.open(&kernel_manifest_path)
|
||||
.unwrap();
|
||||
kernel_manifest_file
|
||||
.write_all(include_bytes!("work_in_workspace_templates/myos/Cargo.toml"))
|
||||
.write_all(include_bytes!(
|
||||
"work_in_workspace_templates/myos/Cargo.toml"
|
||||
))
|
||||
.unwrap();
|
||||
kernel_manifest_file.flush().unwrap();
|
||||
|
||||
// Add the content to myos/src/lib.rs
|
||||
let kernel_src_path = workspace_dir.join(kernel).join("src").join("lib.rs");
|
||||
assert!(kernel_src_path.is_file());
|
||||
fs::write(&kernel_src_path, include_str!("work_in_workspace_templates/myos/src/lib.rs")).unwrap();
|
||||
fs::write(
|
||||
&kernel_src_path,
|
||||
include_str!("work_in_workspace_templates/myos/src/lib.rs"),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// Run subcommand build & run
|
||||
cargo_osdk(&["build"]).ok().unwrap();
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
set -e
|
||||
|
||||
WORKSPACE_ROOT="$(dirname "$(readlink -f "$0")")/.."
|
||||
|
||||
EXCLUDED_CRATES=$(sed -n '/^\[workspace\]/,/^\[.*\]/{/exclude = \[/,/\]/p}' "$WORKSPACE_ROOT/Cargo.toml" | grep -v "exclude = \[" | tr -d '", \]')
|
||||
|
Loading…
x
Reference in New Issue
Block a user