diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-04-08 16:39:53 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2011-04-08 16:39:53 +0100 |
commit | bdd91be4931fce7caea91f9614c12b4ff335f821 (patch) | |
tree | 59c502cce5e0cfbc1f59d0d4e2a6f01fbefbb689 /tools/libxl/libxl_blktap2.c | |
parent | 44714d9fb796f13c8854aba9d6fdf1d32cb0432f (diff) | |
download | xen-bdd91be4931fce7caea91f9614c12b4ff335f821.tar.gz xen-bdd91be4931fce7caea91f9614c12b4ff335f821.tar.bz2 xen-bdd91be4931fce7caea91f9614c12b4ff335f821.zip |
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 <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_blktap2.c')
-rw-r--r-- | tools/libxl/libxl_blktap2.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |