From f55f75d6894fe997a619df3fc4ca6e5c9d7b79a6 Mon Sep 17 00:00:00 2001 From: Jakub Staron Date: Fri, 26 Apr 2019 11:22:51 -0700 Subject: crosvm: Fix misleading field name in VmComponents struct. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames field memory_mb to memory_size. All usages of this field treat it as a memory size in bytes, not megabytes. BUG=None TEST=cargo check TEST=cargo check --package aarch64 --target aarch64-unknown-linux-gnu Change-Id: I7b1aefe4f0b612d5eeb2987dc2a0fce6db0dd228 Reviewed-on: https://chromium-review.googlesource.com/1585617 Commit-Ready: Jakub StaroĊ„ Tested-by: kokoro Reviewed-by: Zach Reizner --- src/linux.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/linux.rs') diff --git a/src/linux.rs b/src/linux.rs index 7733672..223b3a3 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -1123,7 +1123,7 @@ pub fn run_config(cfg: Config) -> Result<()> { }; let components = VmComponents { - memory_mb: (cfg.memory.unwrap_or(256) << 20) as u64, + memory_size: (cfg.memory.unwrap_or(256) << 20) as u64, vcpu_count: cfg.vcpu_count.unwrap_or(1), vcpu_affinity: cfg.vcpu_affinity.clone(), kernel_image: File::open(&cfg.kernel_path) -- cgit 1.4.1