From 6ae77f8afd24bf68a325bbba8a6cf8e09bd4d2ca Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 29 May 2012 16:36:46 +0100 Subject: libxl: libxl__device_disk_local_attach return a new libxl_device_disk Introduce a new libxl_device_disk* parameter to libxl__device_disk_local_attach, the parameter is allocated by the caller. libxl__device_disk_local_attach is going to fill the new disk with informations about the new locally attached disk. The new libxl_device_disk should be passed to libxl__device_disk_local_detach afterwards. Signed-off-by: Stefano Stabellini Acked-by: Ian Jackson Committed-by: Ian Campbell --- tools/libxl/libxl_bootloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/libxl/libxl_bootloader.c') diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index 30b012d623..e7959b9034 100644 --- a/tools/libxl/libxl_bootloader.c +++ b/tools/libxl/libxl_bootloader.c @@ -225,7 +225,7 @@ static void bootloader_cleanup(libxl__egc *egc, libxl__bootloader_state *bl) if (bl->outputdir) libxl__remove_directory(gc, bl->outputdir); if (bl->diskpath) { - libxl__device_disk_local_detach(gc, bl->disk); + libxl__device_disk_local_detach(gc, &bl->localdisk); free(bl->diskpath); bl->diskpath = 0; } @@ -344,7 +344,7 @@ void libxl__bootloader_run(libxl__egc *egc, libxl__bootloader_state *bl) goto out; } - bl->diskpath = libxl__device_disk_local_attach(gc, bl->disk); + bl->diskpath = libxl__device_disk_local_attach(gc, bl->disk, &bl->localdisk); if (!bl->diskpath) { rc = ERROR_FAIL; goto out; -- cgit v1.2.3