]> xenbits.xensource.com Git - libvirt.git/commit
vsh: Pass correct values for command line completion
authorJohn Ferlan <jferlan@redhat.com>
Fri, 28 Oct 2016 20:59:58 +0000 (16:59 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 28 Oct 2016 21:09:46 +0000 (17:09 -0400)
commit06a7b1ff4dbb1ed6a69e09765bef1f67a75a86eb
tree117f14f6146cd1e1f839daa8848f1f9a5a0cc1a4
parent011935457a3b5d911e10dc60c681778e78c8fdf9
vsh: Pass correct values for command line completion

Commit id 'dcfdf341' passes 'opts_need_arg' and 'opts_seen' to
vshCmddefGetData, but that seems to be incorrect as those values
are not initialized properly (something at least one compiler found).
Instead the static 'const_opts_need_arg' and 'const_opts_seen' values
should be passed.

By passing unitialized values leads to not finding possible options
for simpler commands (domfsfreeze for example), where if you're in
a virsh shell using command line completion - you'll get a list of
files in your current directory instead of two options --domain and
--mountpoint (as would happen with this patch applied.
tools/vsh.c