Skip to content

Commit

Permalink
Removed verbose flag. Fixes #496
Browse files Browse the repository at this point in the history
  • Loading branch information
jounathaen committed May 2, 2023
1 parent f9c7ad8 commit 9ad019a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 23 deletions.
6 changes: 0 additions & 6 deletions src/bin/uhyve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ fn setup_trace() {
#[derive(Parser, Debug)]
#[clap(version, author, about)]
struct Args {
/// Print kernel messages
#[clap(short, long)]
verbose: bool,

#[clap(flatten, next_help_heading = "MEMORY")]
memory_args: MemoryArgs,

Expand Down Expand Up @@ -229,7 +225,6 @@ impl CpuArgs {
impl From<Args> for Params {
fn from(args: Args) -> Self {
let Args {
verbose,
memory_args:
MemoryArgs {
memory_size,
Expand All @@ -251,7 +246,6 @@ impl From<Args> for Params {
kernel_args,
} = args;
Self {
verbose,
memory_size,
#[cfg(target_os = "linux")]
thp,
Expand Down
7 changes: 0 additions & 7 deletions src/linux/uhyve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ pub struct Uhyve {
path: PathBuf,
args: Vec<OsString>,
boot_info: *const RawBootInfo,
verbose: bool,
uhyve_device: Option<UhyveNetwork>,
virtio_device: Arc<Mutex<VirtioNetPciDevice>>,
pub(super) gdb_port: Option<u16>,
Expand All @@ -145,7 +144,6 @@ impl fmt::Debug for Uhyve {
.field("num_cpus", &self.num_cpus)
.field("path", &self.path)
.field("boot_info", &self.boot_info)
.field("verbose", &self.verbose)
.field("uhyve_device", &self.uhyve_device)
.field("virtio_device", &self.virtio_device)
.finish()
Expand Down Expand Up @@ -260,7 +258,6 @@ impl Uhyve {
path: kernel_path,
args: params.kernel_args,
boot_info: ptr::null(),
verbose: params.verbose,
uhyve_device,
virtio_device,
gdb_port: params.gdb_port,
Expand All @@ -273,10 +270,6 @@ impl Uhyve {
}

impl Vm for Uhyve {
fn verbose(&self) -> bool {
self.verbose
}

fn set_offset(&mut self, offset: u64) {
self.offset = offset;
}
Expand Down
4 changes: 0 additions & 4 deletions src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ use thiserror::Error;

#[derive(Debug, Clone)]
pub struct Params {
/// Print kernel messages
pub verbose: bool,

/// Guest RAM size
pub memory_size: GuestMemorySize,

Expand Down Expand Up @@ -43,7 +40,6 @@ pub struct Params {
impl Default for Params {
fn default() -> Self {
Self {
verbose: Default::default(),
memory_size: Default::default(),
#[cfg(target_os = "linux")]
thp: false,
Expand Down
5 changes: 1 addition & 4 deletions src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ pub trait Vm {
fn kernel_path(&self) -> &Path;
fn create_cpu(&self, id: u32) -> HypervisorResult<UhyveCPU>;
fn set_boot_info(&mut self, header: *const RawBootInfo);
fn verbose(&self) -> bool;
fn init_guest_mem(&self);

unsafe fn load_kernel(&mut self) -> LoadKernelResult<()> {
Expand Down Expand Up @@ -355,9 +354,7 @@ pub trait Vm {
let boot_info = BootInfo {
hardware_info: HardwareInfo {
phys_addr_range: arch::RAM_START..arch::RAM_START + vm_mem_len as u64,
serial_port_base: self
.verbose()
.then(|| SerialPortBase::new(UHYVE_UART_PORT.into()).unwrap()),
serial_port_base: SerialPortBase::new(UHYVE_UART_PORT.into()),
device_tree: None,
},
load_info,
Expand Down
1 change: 0 additions & 1 deletion tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pub fn build_hermit_bin(kernel: impl AsRef<Path>) -> PathBuf {
/// simple uhyve vm
pub fn run_simple_vm(kernel_path: PathBuf) {
let params = Params {
verbose: true,
cpu_count: 2.try_into().unwrap(),
memory_size: Byte::from_bytes(32 * 1024 * 1024).try_into().unwrap(),
..Default::default()
Expand Down
1 change: 0 additions & 1 deletion tests/gdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ fn gdb() -> io::Result<()> {
let vm = Uhyve::new(
bin_path,
Params {
verbose: true,
gdb_port: Some(port),
..Default::default()
},
Expand Down

0 comments on commit 9ad019a

Please sign in to comment.