Skip to content

Commit

Permalink
refactor(builder): Refactor vmm builder code to simplify logic
Browse files Browse the repository at this point in the history
eliminate the unnecessary usage of the event_manager argument and
fix up aarch64 attach_legacy_devices_aarch64 fn

Signed-off-by: tommady <tommady@users.noreply.github.com>
  • Loading branch information
tommady committed Nov 22, 2024
1 parent effeb7b commit 1e3fc10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vmm/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ pub mod aarch64 {
if cmdline_contains_console {
// Make stdout non-blocking.
set_stdout_nonblocking();
let serial = setup_serial_device(event_manager, std::io::stdin(), std::io::stdout())?;
let serial = setup_serial_device(std::io::stdin(), std::io::stdout())?;
event_manager.add_subscriber(serial.clone());

vmm.mmio_device_manager
.register_mmio_serial(vmm.vm.fd(), &mut vmm.resource_allocator, serial, None)
.map_err(VmmError::RegisterMMIODevice)?;
Expand Down

0 comments on commit 1e3fc10

Please sign in to comment.