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

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

 



On Mon, Jul 20, 2015 at 15:23:15 -0600, Eric Blake wrote:
> 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?

It probably will. We should seriously stop supporting that, but for now
I'll leave it as abortMode and tweak the VSH_EXCLUSIVE_OPTIONS_VAR to
VSH_EXCLUSIVE_OPTIONS in cases where 'abort' would be mentioned.

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]