Markus Armbruster <arm...@redhat.com> writes:

> 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.

Sufficiently common cases can also be delegated to generic code:

* Maximum number of CPUs

  Got that: QEMUMachine member max_cpus, main() enforces it.

* Require -kernel

  Have a flag in QEMUMachine, enforce in main().

* Require certain drives

  Have QEMUMachine declare minimum and maximum number drives of each
  BlockInterfaceType?

Reply via email to