WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl_set_memory_target: do not lose the error status
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 12:52:12 +0100
Delivery-date: Fri, 24 Sep 2010 04:52:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxl_set_memory_target: do not lose the error status, Stefano Stabellini <=