mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
remove duplicated structure InitrdConfig
structure InitrdConfig duplicated with InitramfsConfig Signed-off-by: LiYa'nan <oliverliyn@gmail.com>
This commit is contained in:
parent
afe60808ac
commit
313883f6e4
@ -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<T: DeviceInfoForFDT + Clone + Debug>(
|
||||
vcpu_mpidr: Vec<u64>,
|
||||
device_info: &HashMap<(DeviceType, String), T>,
|
||||
gic_device: &Box<dyn GICDevice>,
|
||||
initrd: &Option<InitrdConfig>,
|
||||
initrd: &Option<InitramfsConfig>,
|
||||
) -> Result<Vec<u8>> {
|
||||
// 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<u8>, guest_mem: &GuestMemoryMmap) -> Result<
|
||||
fn create_chosen_node(
|
||||
fdt: &mut Vec<u8>,
|
||||
cmdline: &CStr,
|
||||
initrd: &Option<InitrdConfig>,
|
||||
initrd: &Option<InitramfsConfig>,
|
||||
) -> Result<()> {
|
||||
append_begin_node(fdt, "chosen")?;
|
||||
append_property_cstring(fdt, "bootargs", cmdline)?;
|
||||
|
@ -104,7 +104,7 @@ pub fn configure_system<T: DeviceInfoForFDT + Clone + Debug>(
|
||||
vcpu_mpidr: Vec<u64>,
|
||||
device_info: &HashMap<(DeviceType, String), T>,
|
||||
gic_device: &Box<dyn GICDevice>,
|
||||
initrd: &Option<super::InitrdConfig>,
|
||||
initrd: &Option<super::InitramfsConfig>,
|
||||
) -> super::Result<()> {
|
||||
let dtb = fdt::create_fdt(
|
||||
guest_mem,
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user