vmm: Move SerialBuffer to its own crate

We want to be able to reuse the SerialBuffer from the virtio-devices
crate, particularly from the virtio-console implementation. That's why
we move the SerialBuffer definition to its own crate so that it can be
accessed from both vmm and virtio-devices crates, without creating any
cyclic dependency.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2022-08-25 10:26:59 +02:00
parent 63462fd8ab
commit a940f525a8
7 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -5,12 +5,12 @@
use crate::config::ConsoleOutputMode;
use crate::device_manager::PtyPair;
use crate::serial_buffer::SerialBuffer;
#[cfg(target_arch = "aarch64")]
use devices::legacy::Pl011;
#[cfg(target_arch = "x86_64")]
use devices::legacy::Serial;
use libc::EFD_NONBLOCK;
use serial_buffer::SerialBuffer;
use std::fs::File;
use std::io::Read;
use std::os::unix::io::{AsRawFd, FromRawFd};