Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux