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 <esteban.baron@etu.umontpellier.fr>
Signed-off-by: Alexis Langlet <alexis.langlet@etu.umontpellier.fr>
  • Loading branch information
alexis-langlet and EstebanBAR0N committed Apr 11, 2023
1 parent 1fafb4f commit f144cbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 84 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(())
}
80 changes: 0 additions & 80 deletions src/vmm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 @@ -328,7 +328,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 @@ -417,7 +417,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 f144cbe

Please sign in to comment.