Re: [PATCH 02/13] virsh: cmdBlockJob: Switch to declarative flag interlocking

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

 



On 07/15/2015 10:33 AM, Peter Krempa wrote:
> Use the VSH_EXCLUSIVE_OPTIONS_VAR to interlock incompatible options
> ---
>  tools/virsh-domain.c | 33 +++++++++++++++++++--------------
>  1 file changed, 19 insertions(+), 14 deletions(-)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 7a18204..24f53ea 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -2542,26 +2542,31 @@ cmdBlockJob(vshControl *ctl, const vshCmd *cmd)
>      bool ret = false;
>      bool raw = vshCommandOptBool(cmd, "raw");
>      bool bytes = vshCommandOptBool(cmd, "bytes");
> -    bool abortMode = (vshCommandOptBool(cmd, "abort") ||
> -                      vshCommandOptBool(cmd, "async") ||
> -                      vshCommandOptBool(cmd, "pivot"));
> -    bool infoMode = vshCommandOptBool(cmd, "info") || raw;
> +    bool abort = vshCommandOptBool(cmd, "abort");

Will that get you in trouble with older compilers that complain about
local variables shadowing global function names?

Other than that, ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP 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]