# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1276256147 -3600
# Node ID 8f342d84db4b9122af77c6591f8a769833c08be5
# Parent 125b3493dac921384aa923c767f6624e5f869dad
libxl: blktap2 fix
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
tools/libxl/libxl.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff -r 125b3493dac9 -r 8f342d84db4b tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Fri Jun 11 11:37:22 2010 +0100
+++ b/tools/libxl/libxl.c Fri Jun 11 12:35:47 2010 +0100
@@ -1253,15 +1253,13 @@ static char *make_blktap2_device(struct
static char *make_blktap2_device(struct libxl_ctx *ctx,
const char *name, const char *type)
{
- char *params, *devname = NULL, *rv = NULL;
+ char *params, *devname = NULL;
int err;
params = libxl_sprintf(ctx, "%s:%s", type, name);
err = tap_ctl_create(params, &devname);
- if (!err) {
- rv = libxl_sprintf(ctx, devname);
- free(devname);
- }
- return rv;
+ if (!err)
+ libxl_ptr_add(ctx, devname);
+ return err ? NULL : devname;
}
int libxl_device_disk_add(struct libxl_ctx *ctx, uint32_t domid,
libxl_device_disk *disk)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|