From bdd91be4931fce7caea91f9614c12b4ff335f821 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 8 Apr 2011 16:39:53 +0100 Subject: libxl: refactor DISK_BACKEND_PHY handling in libxl_device_disk_add A step on the path to sharing this code with the tail-end of the DISK_BACKEND_TAP case. I made the result of libxl__blktap_devpath non-const to achieve this. The existing caller calls libxl__strdup on the result but since the function is an internal one and the result is already garbage collected I think this is unnecessary and we can just use the non-const result directly. Signed-off-by: Ian Campbell Committed-by: Ian Jackson --- tools/libxl/libxl_blktap2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/libxl/libxl_blktap2.c') diff --git a/tools/libxl/libxl_blktap2.c b/tools/libxl/libxl_blktap2.c index b238a0a7ca..7c165fcc9a 100644 --- a/tools/libxl/libxl_blktap2.c +++ b/tools/libxl/libxl_blktap2.c @@ -24,9 +24,9 @@ int libxl__blktap_enabled(libxl__gc *gc) return !tap_ctl_check(&msg); } -const char *libxl__blktap_devpath(libxl__gc *gc, - const char *disk, - libxl_disk_format format) +char *libxl__blktap_devpath(libxl__gc *gc, + const char *disk, + libxl_disk_format format) { const char *type; char *params, *devname = NULL; -- cgit v1.2.3