-----Original Message-----
From: Eric Blake [mailto:eblake@redhat.com]
Sent: Thursday, October 24, 2013 3:22 PM
To: libvir-list(a)redhat.com
Cc: chenhanxiao(a)cn.fujitsu.com
Subject: [PATCHv2 1/2] virsh: allow alias to expand to opt=value pair
We want to treat 'attach-disk --shareable' as an undocumented
alias for 'attach-disk --mode=shareable'. By improving our
alias handling, we can allow all such --bool -> --opt=value
replacements, and guarantee up front that the alias is not
mixed with its replacement.
* tools/virsh.c (vshCmddefOptParse, vshCmddefGetOption): Add
support for expanding bool alias to --opt=value.
(opts_echo): Add another alias to test it.
* tests/virshtest.c (mymain): Test it.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
tests/virshtest.c | 1 +
tools/virsh.c | 58
+++++++++++++++++++++++++++++++++++++++++++++++--------
2 files changed, 51 insertions(+), 8 deletions(-)
ACK
Thanks!