|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 31/32] libxl_disk: Cut libxl_cdrom_insert into step
On Fri, Jul 27, 2018 at 03:06:13PM +0100, Anthony PERARD wrote:
> This is to prepare libxl_cdrom_insert to be able to send commands to
> QEMU via the libxl__ev_qmp. The next patch is going to make use of it.
>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> tools/libxl/libxl_disk.c | 194 +++++++++++++++++++++++++++------------
> 1 file changed, 137 insertions(+), 57 deletions(-)
>
> diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c
> index e9eceb65e3..c759179628 100644
> --- a/tools/libxl/libxl_disk.c
> +++ b/tools/libxl/libxl_disk.c
> @@ -661,31 +661,55 @@ int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t
> domid,
> return rc;
> }
>
> +typedef struct {
> + libxl__ao *ao;
> + libxl_domain_config d_config;
> + const char *be_path;
> + const char *libxl_path;
> + libxl_device_disk *disk;
> + libxl_device_disk disk_empty;
> + libxl_device_disk disk_saved;
> + int dm_ver;
> + int domid;
> + libxl__domain_userdata_lock *lock;
> +} libxl__cdrom_insert_state;
> +static void cdrom_insert_ejected(libxl__egc *egc,
> + libxl__cdrom_insert_state *cis);
> +static void cdrom_insert_inserted(libxl__egc *egc,
> + libxl__cdrom_insert_state *cis);
> +static void cdrom_insert_done(libxl__egc *egc,
> + libxl__cdrom_insert_state *cis,
> + int rc);
Can you provide a comment explaining how is this supposed to work? The
current code is already quite convoluted IMO (maybe because I'm not
familiar with it), so I think a comment would help reviewers.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |