diff mbox series

[XEN,for-4.13,v2,2/9] xl: Pass libxl_domain_config to freemem(), instead of b_info

Message ID 20191010151111.22125-3-ian.jackson@eu.citrix.com (mailing list archive)
State Superseded
Headers show
Series libxl memkb & pt defaulting | expand

Commit Message

Ian Jackson Oct. 10, 2019, 3:11 p.m. UTC
We are going to change the libxl API in a moment and this change will
make it simpler.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/xl/xl_vmcontrol.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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;