[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl_set_memory_target: do not lose the error status



libxl_set_memory_target: do not lose the error status on abort

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r d520b2bce1d8 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Sep 23 18:51:52 2010 +0100
+++ b/tools/libxl/libxl.c       Thu Sep 23 18:54:00 2010 +0100
@@ -2895,6 +2895,7 @@ retry_transaction:
                 "cannot get target memory info from %s/memory/target\n",
                 dompath);
         abort = 1;
+        rc = ERROR_FAIL;
         goto out;
     } else {
         current_target_memkb = strtoul(target, &endptr, 10);
@@ -2903,6 +2904,7 @@ retry_transaction:
                     "invalid memory target %s from %s/memory/target\n",
                     target, dompath);
             abort = 1;
+            rc = ERROR_FAIL;
             goto out;
         }
     }
@@ -2913,6 +2915,7 @@ retry_transaction:
                 "cannot get memory info from %s/memory/static-max\n",
                 dompath);
         abort = 1;
+        rc = ERROR_FAIL;
         goto out;
     }
     memorykb = strtoul(memmax, &endptr, 10);
@@ -2921,12 +2924,14 @@ retry_transaction:
                 "invalid max memory %s from %s/memory/static-max\n",
                 memmax, dompath);
         abort = 1;
+        rc = ERROR_FAIL;
         goto out;
     }
     if (!domid && new_target_memkb < LIBXL_MIN_DOM0_MEM) {
         LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
                 "new target for dom0 is below the minimum threshold\n");
         abort = 1;
+        rc = ERROR_FAIL;
         goto out;
     }
 
@@ -2939,6 +2944,7 @@ retry_transaction:
                 "memory_dynamic_max must be less than or equal to"
                 " memory_static_max\n");
         abort = 1;
+        rc = ERROR_FAIL;
         goto out;
     }
 
@@ -2976,6 +2982,7 @@ retry_transaction:
     rc = xc_domain_getinfolist(ctx->xch, domid, 1, &info);
     if (rc != 1 || info.domain != domid) {
         abort = 1;
+        rc = ERROR_FAIL;
         goto out;
     }
     xcinfo2xlinfo(&info, &ptr)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.