libxl: propagate down the error from libxl_domain_sched_params_set
authorDario Faggioli <dario.faggioli@citrix.com>
Thu, 14 Jun 2012 15:05:42 +0000 (16:05 +0100)
committerDario Faggioli <dario.faggioli@citrix.com>
Thu, 14 Jun 2012 15:05:42 +0000 (16:05 +0100)
So that the caller (e.g., libxl__build_post() ) knows and can deal with it.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dom.c

index 10f8c1f73cf55e77e32c904b27dafaae091de26e..a2e66558d3da3fd0efbfd41657485e9d7e89e64c 100644 (file)
@@ -173,9 +173,11 @@ int libxl__build_post(libxl__gc *gc, uint32_t domid,
     char *dom_path, *vm_path;
     xs_transaction_t t;
     char **ents, **hvm_ents;
-    int i;
+    int i, rc;
 
-    libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
+    rc = libxl_domain_sched_params_set(CTX, domid, &info->sched_params);
+    if (rc)
+        return rc;
 
     libxl_cpuid_apply_policy(ctx, domid);
     if (info->cpuid != NULL)