vmm: device_manager: Use consistent naming when adding devices

When adding devices to the guest, and populating the device model, we
should prefix the routines with add_. When we're just creating the
device objects but not yet adding them we use make_.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz 2019-11-19 17:15:29 +01:00 committed by Sebastien Boeuf
parent a2ee681665
commit f0e618431d

View File

@ -430,13 +430,13 @@ impl DeviceManager {
vm_fd: vm_info.vm_fd.clone(),
});
let ioapic = DeviceManager::make_ioapic(vm_info, &address_manager, userspace_ioapic)?;
let ioapic = DeviceManager::add_ioapic(vm_info, &address_manager, userspace_ioapic)?;
let interrupt_info = InterruptInfo {
_msi_capable,
ioapic: &ioapic,
};
let console = DeviceManager::make_console_device(
let console = DeviceManager::add_console_device(
vm_info,
&address_manager,
&ioapic,
@ -629,7 +629,7 @@ impl DeviceManager {
Ok(())
}
fn make_ioapic(
fn add_ioapic(
vm_info: &VmInfo,
address_manager: &Arc<AddressManager>,
userspace_ioapic: bool,
@ -708,7 +708,7 @@ impl DeviceManager {
Ok(())
}
fn make_console_device(
fn add_console_device(
vm_info: &VmInfo,
address_manager: &Arc<AddressManager>,
ioapic: &Option<Arc<Mutex<ioapic::Ioapic>>>,