mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
380ba564f4
commit
52eebaf6b2
@@ -107,7 +107,7 @@ fn modify_mode<F: FnOnce(&mut termios)>(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_raw_mode(
|
||||
fn set_raw_mode(
|
||||
f: &dyn AsRawFd,
|
||||
original_termios_opt: Arc<Mutex<Option<termios>>>,
|
||||
) -> ConsoleDeviceResult<()> {
|
||||
@@ -120,7 +120,7 @@ pub fn set_raw_mode(
|
||||
.map_err(ConsoleDeviceError::SetPtyRaw)
|
||||
}
|
||||
|
||||
pub fn create_pty() -> io::Result<(File, File, PathBuf)> {
|
||||
fn create_pty() -> io::Result<(File, File, PathBuf)> {
|
||||
// Try to use /dev/pts/ptmx first then fall back to /dev/ptmx
|
||||
// This is done to try and use the devpts filesystem that
|
||||
// could be available for use in the process's namespace first.
|
||||
|
||||
Reference in New Issue
Block a user