From 313883f6e42fddc67cbcdfe767175c671cede9c7 Mon Sep 17 00:00:00 2001 From: LiYa'nan Date: Tue, 9 Jun 2020 11:27:09 +0800 Subject: [PATCH] remove duplicated structure InitrdConfig structure InitrdConfig duplicated with InitramfsConfig Signed-off-by: LiYa'nan --- arch/src/aarch64/fdt.rs | 6 +++--- arch/src/aarch64/mod.rs | 2 +- arch/src/lib.rs | 8 -------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/src/aarch64/fdt.rs b/arch/src/aarch64/fdt.rs index 74901f1fb..d76643bda 100644 --- a/arch/src/aarch64/fdt.rs +++ b/arch/src/aarch64/fdt.rs @@ -14,7 +14,7 @@ use std::ptr::null; use std::{io, result}; use super::super::DeviceType; -use super::super::InitrdConfig; +use super::super::InitramfsConfig; use super::get_fdt_addr; use super::gic::GICDevice; use super::layout::FDT_MAX_SIZE; @@ -90,7 +90,7 @@ pub fn create_fdt( vcpu_mpidr: Vec, device_info: &HashMap<(DeviceType, String), T>, gic_device: &Box, - initrd: &Option, + initrd: &Option, ) -> Result> { // Alocate stuff necessary for the holding the blob. let mut fdt = vec![0; FDT_MAX_SIZE]; @@ -343,7 +343,7 @@ fn create_memory_node(fdt: &mut Vec, guest_mem: &GuestMemoryMmap) -> Result< fn create_chosen_node( fdt: &mut Vec, cmdline: &CStr, - initrd: &Option, + initrd: &Option, ) -> Result<()> { append_begin_node(fdt, "chosen")?; append_property_cstring(fdt, "bootargs", cmdline)?; diff --git a/arch/src/aarch64/mod.rs b/arch/src/aarch64/mod.rs index 9747b50f0..508dcbed4 100644 --- a/arch/src/aarch64/mod.rs +++ b/arch/src/aarch64/mod.rs @@ -104,7 +104,7 @@ pub fn configure_system( vcpu_mpidr: Vec, device_info: &HashMap<(DeviceType, String), T>, gic_device: &Box, - initrd: &Option, + initrd: &Option, ) -> super::Result<()> { let dtb = fdt::create_fdt( guest_mem, diff --git a/arch/src/lib.rs b/arch/src/lib.rs index 4c6d29d86..2204b05be 100644 --- a/arch/src/lib.rs +++ b/arch/src/lib.rs @@ -133,14 +133,6 @@ pub enum DeviceType { RTC, } -/// Type for passing information about the initrd in the guest memory. -pub struct InitrdConfig { - /// Load address of initrd in guest memory - pub address: vm_memory::GuestAddress, - /// Size of initrd in guest memory - pub size: usize, -} - /// Default (smallest) memory page size for the supported architectures. pub const PAGE_SIZE: usize = 4096;