Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions scripts/clippy.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ def main(args) -> int:
if features_arg:
cmd_parts.extend(["--features", f'"{features_arg}"'])

cmd_parts.extend(
[
"--",
"-D",
"warnings",
]
)

cmd = " ".join(cmd_parts)
print(f"执行命令: {cmd}")

Expand Down
3 changes: 1 addition & 2 deletions src/vmm/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ use crate::vmm::fdt::*;

use alloc::sync::Arc;

#[allow(clippy::module_inception)]
#[allow(clippy::module_inception, dead_code)]
pub mod config {
use alloc::string::String;
use alloc::vec::Vec;

/// Default static VM configs. Used when no VM config is provided.
#[allow(dead_code)]
pub fn default_static_vm_configs() -> Vec<&'static str> {
vec![
#[cfg(target_arch = "x86_64")]
Expand Down
3 changes: 2 additions & 1 deletion src/vmm/fdt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ pub fn get_developer_provided_dtb(
use axerrno::ax_err_type;
use std::io::{BufReader, Read};
if let Some(dtb_path) = &crate_config.kernel.dtb_path {
let (dtb_file, dtb_size) = crate::vmm::images::open_image_file(dtb_path).unwrap();
let (dtb_file, dtb_size) =
crate::vmm::images::fs::open_image_file(dtb_path).unwrap();
info!("DTB file in fs, size: 0x{:x}", dtb_size);

let mut file = BufReader::new(dtb_file);
Expand Down
5 changes: 1 addition & 4 deletions src/vmm/images/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub fn load_vm_image_from_memory(
}

#[cfg(feature = "fs")]
mod fs {
pub mod fs {
use super::*;
use crate::hal::CacheOp;
use axerrno::{AxResult, ax_err, ax_err_type};
Expand Down Expand Up @@ -328,6 +328,3 @@ mod fs {
Ok((file, file_size))
}
}

#[cfg(feature = "fs")]
pub use fs::open_image_file;
Loading