On 16/11/2020 14.31, Peter Maydell wrote:
> On Mon, 16 Nov 2020 at 13:28, Philippe Mathieu-Daudé <f4...@amsat.org> wrote:
>> Well, this is not an usable device but a part of a bigger device,
>> so here we want the opposite: not list this device in any category.
>>
>> Maybe we could add a DEVICE_CATEGORY_COMPOSITE for all such QOM
>> types so management apps can filter them out? (And so we are sure
>> all QOM is classified).
>>
>> Thomas, you already dealt with categorizing devices in the past,
>> what do you think about this? Who else could help? Maybe add
>> someone from libvirt in the thread?
> 
> If we could get to the point where we can assert() that
> dc->categories is non-zero in class init, we would be able
> to avoid further "forgot to categorize device" bugs getting
> into the tree in future, which seems like an argument for
> having some way of marking "really just an implementation
> detail" devices I guess?

IMHO we need:

  assert(dc->user_creatable == false ||  categories != 0)

then we don't need something like DEVICE_CATEGORY_COMPOSITE.

 Thomas


Reply via email to