[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-* |
Date: |
Tue, 2 Mar 2021 19:32:00 +0100 |
Am 26.02.2021 um 20:42 hat Eric Blake geschrieben:
> On 2/24/21 7:52 AM, Kevin Wolf wrote:
> > This adds a QAPI schema for the properties of the can-* objects.
> >
> > can-bus doesn't have any properties, so it only needs to be added to the
> > ObjectType enum without adding a new branch to ObjectOptions.
>
> I somewhat prefer
>
> 'can-bus': {},
>
> to make it explicit that we thought about it, but since we allow
> defaulted union branches, your approach works too.
The QAPI generator disagrees:
../qapi/qom.json: In union 'ObjectOptions':
../qapi/qom.json:492: 'data' member 'can-bus' misses key 'type'
It seems we can't use inline definitions of struct types because we
already use that for the extended description of branch types. And
adding a whole named struct without content is probably a bit too much?
Kevin
- Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*,
Kevin Wolf <=