« Previous | Next » 

Revision 50f2bdc7

ID50f2bdc75c5ee00617ad874c9ceac2cea660aa1e

Added by Kevin Wolf over 10 years ago

qapi: Flat unions with arbitrary discriminator

Instead of the rather verbose syntax that distinguishes base and
subclass fields...

{ "type": "file",
"read-only": true,
"data": {
"filename": "test"
} }

...we can now have both in the same namespace, allowing a more direct
mapping of the command line, and moving fields between the common base
and subclasses without breaking the API:

{ "driver": "file",
"read-only": true,
"filename": "test" }

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences