[libvirt] [PATCH v2] virsh: distinguish errors between missing argument and wrong option
Eric Blake
eblake at redhat.com
Tue Feb 19 16:33:07 UTC 2013
On 02/19/2013 01:50 AM, Guannan Ren wrote:
> Specifying ':' to suppress the error messages printed by getopt().
> Then, distinguish the two types of errors.
>
> Before:
> # virsh -c
> virsh: option requires an argument -- 'c'
> error: unsupported option '-?'. See --help.
>
> After:
> # virsh -c
> error: option '-c' requires an argument
>
> # virsh -x
> error: unsupported option '-x'. See --help.
ACK.
--
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/20130219/3746d586/attachment-0001.sig>
More information about the libvir-list
mailing list