
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