vmm: refactor DeviceManager to use console_info

While adding console devices, DeviceManager will now use the FDs in
console_info instead of creating them.

To reduce the size of this commit, I marked some variables are unused
with '_' prefix. All those variables are cleaned up in next commit.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
Praveen K Paladugu
2024-05-02 21:42:57 +00:00
committed by Rob Bradford
parent 380ba564f4
commit 52eebaf6b2
5 changed files with 114 additions and 144 deletions
+4
View File
@@ -813,6 +813,7 @@ impl Vmm {
None,
None,
None,
None,
Arc::clone(&self.original_termios_opt),
Some(snapshot),
)
@@ -1266,6 +1267,7 @@ impl RequestHandler for Vmm {
None,
None,
None,
self.console_info.clone(),
None,
Arc::clone(&self.original_termios_opt),
None,
@@ -1395,6 +1397,7 @@ impl RequestHandler for Vmm {
None,
None,
None,
self.console_info.clone(),
None,
Arc::clone(&self.original_termios_opt),
Some(snapshot),
@@ -1501,6 +1504,7 @@ impl RequestHandler for Vmm {
serial_pty,
console_pty,
debug_console_pty,
self.console_info.clone(),
console_resize_pipe,
Arc::clone(&self.original_termios_opt),
None,