From: Ian Jackson Date: Thu, 3 Oct 2019 16:06:43 +0000 (+0100) Subject: xl: Pass libxl_domain_config to freemem(), instead of b_info X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3f21bd497747fbfe6e548a3c50b55dfe21a1eefb;p=people%2Fliuw%2Fxen.git xl: Pass libxl_domain_config to freemem(), instead of b_info We are going to change the libxl API in a moment and this change will make it simpler. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD Release-acked-by: Juergen Gross --- diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index b20582e15b..d33c6b38c9 100644 --- a/tools/xl/xl_vmcontrol.c +++ b/tools/xl/xl_vmcontrol.c @@ -314,7 +314,7 @@ static int domain_wait_event(uint32_t domid, libxl_event **event_r) * Returns true in case there is already, or we manage to free it, enough * memory, but also if autoballoon is false. */ -static bool freemem(uint32_t domid, libxl_domain_build_info *b_info) +static bool freemem(uint32_t domid, libxl_domain_config *d_config) { int rc, retries = 3; uint64_t need_memkb, free_memkb; @@ -322,7 +322,7 @@ static bool freemem(uint32_t domid, libxl_domain_build_info *b_info) if (!autoballoon) return true; - rc = libxl_domain_need_memory(ctx, b_info, &need_memkb); + rc = libxl_domain_need_memory(ctx, &d_config->b_info, &need_memkb); if (rc < 0) return false; @@ -879,7 +879,7 @@ start: goto error_out; if (domid_soft_reset == INVALID_DOMID) { - if (!freemem(domid, &d_config.b_info)) { + if (!freemem(domid, &d_config)) { fprintf(stderr, "failed to free memory for the domain\n"); ret = ERROR_FAIL; goto error_out;