Re: [PATCH 05/24] qemu: Introduce qemuProcessIncomingDef

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 12, 2015 at 19:37:07 +0100, Jiri Denemark wrote:
> Incoming migration may require quite a few parameters (URI, fd, path) to
> be considered while starting QEMU and we will soon add another one.
> Let's group all of them in a single struct.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 67 +++++++++++++++++++++++++++++++++++++++----------
>  src/qemu/qemu_process.h | 14 +++++++++++
>  2 files changed, 68 insertions(+), 13 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index fdd640d..638ad02 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -4156,6 +4156,47 @@ qemuLogOperation(virDomainObjPtr vm,

[...]

> +
> +qemuProcessIncomingDefPtr
> +qemuProcessIncomingDefNew(virQEMUCapsPtr qemuCaps,
> +                          const char *migrateFrom,
> +                          int fd,
> +                          const char *path)

Please add a comment stating that @path is not copied, so it has to be
available duirng the lifetime of the struct this allocates.

> +{
> +    qemuProcessIncomingDefPtr inc = NULL;
> +
> +    if (qemuMigrationCheckIncoming(qemuCaps, migrateFrom) < 0)
> +        return NULL;
> +
> +    if (VIR_ALLOC(inc) < 0)
> +        return NULL;
> +
> +    inc->launchURI = qemuMigrationIncomingURI(migrateFrom, fd);
> +    if (!inc->launchURI)
> +        goto error;
> +
> +    inc->fd = fd;
> +    inc->path = path;
> +
> +    return inc;
> +
> + error:
> +    qemuProcessIncomingDefFree(inc);
> +    return NULL;
> +}
> +
> +
>  int qemuProcessStart(virConnectPtr conn,
>                       virQEMUDriverPtr driver,
>                       virDomainObjPtr vm,

ACK

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]