From: dv Date: Wed, 4 May 2022 02:24:26 +0000 (+0000) Subject: Missed removing some memory scaling in vmm, vmctl. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=39e812af2b727c024bb7c03d66674140a0db3d4d;p=openbsd Missed removing some memory scaling in vmm, vmctl. Continuation of commitid RbITgDkOsW8SMssz removing use of megabytes instead of bytes in vmm(4) and vmctl(8). Missed this spot that only manifests after a vm is started and has its runtime details inspected. --- diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index d218407f5bb..090feb6623a 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.307 2022/05/03 21:39:18 dv Exp $ */ +/* $OpenBSD: vmm.c,v 1.308 2022/05/04 02:24:26 dv Exp $ */ /* * Copyright (c) 2014 Mike Larkin * @@ -1635,7 +1635,6 @@ vm_create_check_mem_ranges(struct vm_create_params *vcp) if (memsize % (1024 * 1024) != 0) return (0); - memsize /= 1024 * 1024; return (memsize); } diff --git a/usr.sbin/vmctl/vmctl.c b/usr.sbin/vmctl/vmctl.c index b1977f95051..9cda15bdc77 100644 --- a/usr.sbin/vmctl/vmctl.c +++ b/usr.sbin/vmctl/vmctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmctl.c,v 1.80 2022/05/03 21:39:18 dv Exp $ */ +/* $OpenBSD: vmctl.c,v 1.81 2022/05/04 02:24:26 dv Exp $ */ /* * Copyright (c) 2014 Mike Larkin @@ -793,8 +793,7 @@ print_vm_info(struct vmop_info_result *list, size_t ct) (void)strlcpy(curmem, "-", sizeof(curmem)); (void)strlcpy(maxmem, "-", sizeof(maxmem)); - (void)fmt_scaled(vir->vir_memory_size * 1024 * 1024, - maxmem); + (void)fmt_scaled(vir->vir_memory_size, maxmem); if (running) { if (*vmi->vir_ttyname == '\0')