Skip to content

Commit

Permalink
fix: clean-up no-console
Browse files Browse the repository at this point in the history
Delete the no console attribute where not longer used

Co-authored-by: Esteban Baron <[email protected]>
Signed-off-by: Alexis Langlet <[email protected]>
(cherry picked from commit f144cbe)
  • Loading branch information
alexis-langlet committed Apr 11, 2023
1 parent faf2274 commit 4e051ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn main() -> Result<(), Error> {
.map_err(Error::VmmConfigure)?;

// Run the VMM
vmm.run(opts.console.is_none()).map_err(Error::VmmRun)?;
vmm.run().map_err(Error::VmmRun)?;

Ok(())
}
5 changes: 2 additions & 3 deletions src/vmm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::any::Any;
use std::fs::File;
use std::io::stdout;
use std::os::unix::io::AsRawFd;
use std::os::unix::net::{UnixListener, UnixStream};
use std::os::unix::net::UnixListener;
use std::os::unix::prelude::RawFd;
use std::path::Path;
use std::sync::{Arc, Mutex};
Expand Down Expand Up @@ -341,7 +341,7 @@ impl VMM {
}

// Run all virtual CPUs.
pub fn run(&mut self, no_console: bool) -> Result<()> {
pub fn run(&mut self) -> Result<()> {
let mut unix_socket_name = String::from("/tmp/vmm.sock");
while Path::new(&unix_socket_name).exists() {
let rng = rand::rand_alphanumerics(8);
Expand Down Expand Up @@ -430,7 +430,6 @@ impl VMM {

if connections.iter().any(|c| c.as_raw_fd() == event_data) {
use vmm_sys_util::signal::Killable;
println!("Shutting down");
handlers.iter().for_each(|handler| {
handler.kill(9).unwrap();
});
Expand Down

0 comments on commit 4e051ce

Please sign in to comment.