[libvirt] [PATCH 2/5]virsh: introduce flags VSH_OFLAG_IGNORE

Eric Blake eblake at redhat.com
Tue Oct 22 06:27:03 UTC 2013


On 10/18/2013 07:42 AM, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> 
> If some command option should be phased out,
> we need to hide it. But for backwards compatibility,
> we had to keep those obsolete codes.
> With this flag, we could keep most of the old codes
> and let tools like virsh know don't show it.
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
>  tools/virsh.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/virsh.h b/tools/virsh.h
> index f978d94..029ae9f 100644
> --- a/tools/virsh.h
> +++ b/tools/virsh.h
> @@ -136,6 +136,7 @@ enum {
>      VSH_OFLAG_REQ      = (1 << 0), /* option required */
>      VSH_OFLAG_EMPTY_OK = (1 << 1), /* empty string option allowed */
>      VSH_OFLAG_REQ_OPT  = (1 << 2), /* --optionname required */
> +    VSH_OFLAG_IGNORE   = (1 << 3), /* keep this option but don't show it to users */

I'm not convinced.  I think the VSH_OT_ALIAS should instead be enhanced
to do what we want, rather than adding yet another mechanism for hiding
options.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131022/ac9ace37/attachment-0001.sig>


More information about the libvir-list mailing list