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]xl: Remove transaction handle in "xl rename"

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]xl: Remove transaction handle in "xl rename"
From: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
Date: Mon, 10 May 2010 16:07:01 +0800
Delivery-date: Mon, 10 May 2010 01:06:42 -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: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100415 Thunderbird/3.0.4
Remove transaction handle in "xl rename"
Thanks Stefano to point out that transaction handle in libxl clients
is not needed.

Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>

diff -r bbf009817ffb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Fri May 07 19:22:28 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue May 11 00:03:52 2010 +0800
@@ -3072,7 +3072,6 @@
     int opt;
     char *dom;
     char *new_name;
-    xs_transaction_t t;
 
     while ((opt = getopt(argc, argv, "h")) != -1) {
         switch (opt) {
@@ -3095,16 +3094,10 @@
     find_domain(dom);
     new_name = argv[optind];
 
-retry_transaction:
-    t = xs_transaction_start(ctx.xsh);
-    if (libxl_domain_rename(&ctx, domid, common_domname, new_name, t)) {
+    if (libxl_domain_rename(&ctx, domid, common_domname, new_name, 0)) {
         fprintf(stderr, "Can't rename domain '%s'.\n", dom);
         exit(1);
     }
 
-    if (!xs_transaction_end(ctx.xsh, t, 0))
-        if (errno == EAGAIN)
-            goto retry_transaction;
-
     exit(0);
 }

-- 
Regards
Yang Hongyang

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]xl: Remove transaction handle in "xl rename", Yang Hongyang <=