diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index 9f2ae09e1..649b76df1 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -265,14 +265,15 @@ type VirtioDeviceArc = Arc>; pub fn get_win_size() -> (u16, u16) { #[repr(C)] + #[derive(Default)] struct WS { rows: u16, cols: u16, + xpixel: u16, + ypixel: u16, }; - let ws: WS = WS { - rows: 0u16, - cols: 0u16, - }; + let ws: WS = WS::default(); + unsafe { libc::ioctl(0, TIOCGWINSZ, &ws); }