On 08/07/2012 02:30 PM, Markus Armbruster wrote:
> Peter Maydell <peter.mayd...@linaro.org> writes:
> 
>> On 7 August 2012 20:55, Markus Armbruster <arm...@redhat.com> wrote:
>>> Anthony Liguori <anth...@codemonkey.ws> writes:
>>>> Perhaps we could add a QEMUMachine parameter that indicates that the
>>>> machine doesn't start without special options.
>>>
>>> Recommend to make it a string that lists the mandatory options.
>>
>> How are you going to say "need either option foo or option bar" ? I'm
>> pretty sure we have some of those (eg "either you need to pass a flash
>> image or a kernel").
> 
> Yes, we do.
> 
> The string should be suitable for inserting into -help.

Convention in other programs' -help output is to express a mandatory
selection from mutually exclusive options using {}, as in:

 { -foo | -bar }

If both options can be used together, but cannot both be omitted, then
this style works:

 { -foo [ -bar ] | -bar }

Mutually exclusive options, but where omission is okay, would then be:

 [ { -foo | -bar } ]

or even this variant, to express the default when both are omitted:

 { -foo | [ -bar ] }

Using strings with metasyntax like that should be usable in qemu -help.

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to