Eric Blake <ebl...@redhat.com> writes: > On 03/16/2017 04:46 AM, Janne Huttunen wrote: >> On Wed, 2017-03-15 at 08:24 +0100, Gerd Hoffmann wrote: >>>> >>>> The short answer: emulating real hardware. >>> >>> Ok, that is reason enough. >>> >>> Adding bootonceindex everywhere doesn't look like the best plan to me >>> though. Possibly we can pimp up bootindex in a backward-compatible >>> way? >>> Something like bootindex=<normal>[.<once>] ? >> >> That would (likely) avoid modifying all devices, but wouldn't >> that make the 'bootindex' property a string (now: 'int32') >> and thus change the QOM API? > > Is there any way to make use of an alternate that supports both int and > string simultaneously? But see also Markus' recent addendum on the > difficulties of supporting multiple types on command-line vs. through QMP: > > https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg04125.html
Making it a string that encodes two integers would be inappropriate for QMP. If you need two integers, QMP wants you to put two integers in JSON. That means either a new member next to bootindex, or turning bootindex into an alternate of integer and object. Not passing judgement on whether we actually need "once".