Re: [PATCH 02/24] qemu: Refactor the code to build -incoming command line

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

 



On Thu, Nov 12, 2015 at 19:37:04 +0100, Jiri Denemark wrote:
> Move the code from qemuBuildCommandLine into dedicated functions.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
> 
> Notes:
>     Both functions will later be moved to qemu_migration.c
> 
>  src/qemu/qemu_command.c | 75 +++++++++++++++++++++++++++++++++----------------
>  1 file changed, 51 insertions(+), 24 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 792ada3..723609d 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -11006,32 +11045,20 @@ qemuBuildCommandLine(virConnectPtr conn,
>      }
>  
>      if (migrateFrom) {
> -        virCommandAddArg(cmd, "-incoming");
> -        if (STRPREFIX(migrateFrom, "tcp")) {
> -            virCommandAddArg(cmd, migrateFrom);
> -        } else if (STRPREFIX(migrateFrom, "rdma")) {
> -            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MIGRATE_RDMA)) {
> -                virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
> -                               _("incoming RDMA migration is not supported "
> -                                 "with this QEMU binary"));
> -                goto error;
> -            }
> -            virCommandAddArg(cmd, migrateFrom);
> -        } else if (STREQ(migrateFrom, "stdio")) {
> -            virCommandAddArgFormat(cmd, "fd:%d", migrateFd);
> -            virCommandPassFD(cmd, migrateFd, 0);
> -        } else if (STRPREFIX(migrateFrom, "exec")) {
> -            virCommandAddArg(cmd, migrateFrom);
> -        } else if (STRPREFIX(migrateFrom, "fd")) {
> -            virCommandAddArg(cmd, migrateFrom);
> +        char *migrateURI;
> +
> +        if (qemuBuildIncomingCheckProtocol(qemuCaps, migrateFrom) < 0)
> +            goto error;
> +
> +        if (STREQ(migrateFrom, "stdio") &&
> +            STRPREFIX(migrateFrom, "fd"))

I doubt that this will ever be true.

Peter

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]