Skip to contentSkip to conversation

xl: Remove transaction handle in "xl rename"

PATCH New Yang Hongyang 1 participant 1 message May 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: Remove transaction handle in "xl rename"

Remove transaction handle in "xl rename"
Thanks Stefano to point out that transaction handle in libxl clients is not needed.

tools/libxl/xl_cmdimpl.c +1 -8
diff -r bbf009817ffb tools/libxl/xl_cmdimpl.c
@@ -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);
 }
Signature · 2 lines
Regards
Yang Hongyang