aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_internal.h
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-05-29 16:36:46 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-05-29 16:36:46 +0100
commit6ae77f8afd24bf68a325bbba8a6cf8e09bd4d2ca (patch)
treec42e0a1ff5adce5492c2fdd2cb7f4a42f2ad4f6c /tools/libxl/libxl_internal.h
parent06c0bc127b521e9cf9f4b9a06e5b1960e38458b6 (diff)
downloadxen-6ae77f8afd24bf68a325bbba8a6cf8e09bd4d2ca.tar.gz
xen-6ae77f8afd24bf68a325bbba8a6cf8e09bd4d2ca.tar.bz2
xen-6ae77f8afd24bf68a325bbba8a6cf8e09bd4d2ca.zip
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 <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.h')
-rw-r--r--tools/libxl/libxl_internal.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 6ef39061cc..f25a365da6 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1283,7 +1283,8 @@ _hidden void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path);
* a device.
*/
_hidden char * libxl__device_disk_local_attach(libxl__gc *gc,
- libxl_device_disk *disk);
+ const libxl_device_disk *in_disk,
+ libxl_device_disk *new_disk);
_hidden int libxl__device_disk_local_detach(libxl__gc *gc,
libxl_device_disk *disk);
@@ -1818,6 +1819,13 @@ struct libxl__bootloader_state {
libxl__bootloader_console_callback *console_available;
const libxl_domain_build_info *info;
libxl_device_disk *disk;
+ /* Should be zeroed by caller on entry. Will be filled in by
+ * bootloader machinery; represents the local attachment of the
+ * disk for the benefit of the bootloader. Must be detached by
+ * the caller using libxl__device_disk_local_detach, but only
+ * after the domain's kernel and initramfs have been loaded into
+ * memory and the file references disposed of. */
+ libxl_device_disk localdisk;
uint32_t domid;
/* outputs:
* - caller must initialise kernel and ramdisk to point to file