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 25 of 26] libxl: do not GC data returned to the calle

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 25 of 26] libxl: do not GC data returned to the caller by libxl_device_disk_getinfo
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 16 Aug 2010 15:33:49 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 16 Aug 2010 08:06:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1281969204@xxxxxxxxxxxxxxxxxxxxx>
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
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1281969065 -3600
# Node ID 5f7df0947ce97ba5ec604bacd09694ed399c2729
# Parent  9ff0821b2c7915051a64ca89ec9c64a4484c16ad
libxl: do not GC data returned to the caller by libxl_device_disk_getinfo.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 9ff0821b2c79 -r 5f7df0947ce9 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Aug 16 15:31:05 2010 +0100
+++ b/tools/libxl/libxl.c       Mon Aug 16 15:31:05 2010 +0100
@@ -2539,8 +2539,8 @@ int libxl_device_disk_getinfo(libxl_ctx 
 
     /* tap devices entries in xenstore are written as vbd devices. */
     diskpath = libxl_sprintf(&gc, "%s/device/vbd/%d", dompath, 
diskinfo->devid);
-    diskinfo->backend = libxl_xs_read(&gc, XBT_NULL,
-                                      libxl_sprintf(&gc, "%s/backend", 
diskpath));
+    diskinfo->backend = xs_read(ctx->xsh, XBT_NULL,
+                                libxl_sprintf(&gc, "%s/backend", diskpath), 
NULL);
     if (!diskinfo->backend) {
         libxl_free_all(&gc);
         return ERROR_FAIL;
@@ -2553,8 +2553,8 @@ int libxl_device_disk_getinfo(libxl_ctx 
     diskinfo->evtch = val ? strtoul(val, NULL, 10) : -1;
     val = libxl_xs_read(&gc, XBT_NULL, libxl_sprintf(&gc, "%s/ring-ref", 
diskpath));
     diskinfo->rref = val ? strtoul(val, NULL, 10) : -1;
-    diskinfo->frontend = libxl_xs_read(&gc, XBT_NULL,
-                                       libxl_sprintf(&gc, "%s/frontend", 
diskinfo->backend));
+    diskinfo->frontend = xs_read(ctx->xsh, XBT_NULL,
+                                 libxl_sprintf(&gc, "%s/frontend", 
diskinfo->backend), NULL);
     val = libxl_xs_read(&gc, XBT_NULL, libxl_sprintf(&gc, "%s/frontend-id", 
diskinfo->backend));
     diskinfo->frontend_id = val ? strtoul(val, NULL, 10) : -1;
 

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

<Prev in Thread] Current Thread [Next in Thread>