Skip to content

Commit

Permalink
Change type of GDB port to u16
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Sep 7, 2021
1 parent 362de1d commit 62f0471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/bin/uhyve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ fn main() {
}
let gdbport = matches
.value_of("GDB_PORT")
.map(|p| p.parse::<u32>().expect("Could not parse gdb port"))
.map(|p| p.parse::<u16>().expect("Could not parse gdb port"))
.or_else(|| {
env::var("HERMIT_GDB_PORT")
.ok()
.map(|p| p.parse::<u32>().expect("Could not parse gdb port"))
.map(|p| p.parse::<u16>().expect("Could not parse gdb port"))
});

let params = vm::Parameter {
Expand Down
2 changes: 1 addition & 1 deletion src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub struct Parameter<'a> {
pub gateway: Option<&'a str>,
pub mask: Option<&'a str>,
pub nic: Option<&'a str>,
pub gdbport: Option<u32>,
pub gdbport: Option<u16>,
}

#[repr(C, packed)]
Expand Down

0 comments on commit 62f0471

Please sign in to comment.