Re: [PATCH v2] Migration with --live --offline option performs offline migration without warning/error.

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

 



On Mon, Feb 22, 2016 at 07:26:54AM -0500, Nitesh Konkar wrote:
> This patch gives an error when migration is attempted with both
> --live and --offline options.
> 
> Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx>
> ---
>  tools/virsh-domain.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 43c8436..7b4a08e 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -9837,6 +9837,10 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
>      int timeout = 0;
>      bool live_flag = false;
>      virshCtrlData data = { .dconn = NULL };
> +    bool live = vshCommandOptBool(cmd, "live");
> +    bool offline = vshCommandOptBool(cmd, "offline");

There's no need for these variables if you use VSH_EXCLUSIVE_OPTIONS.

Jan

> +
> +    VSH_EXCLUSIVE_OPTIONS_VAR(live, offline);

--
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]