[libvirt] [PATCH 1/9] qemuDomainAttachNetDevice: Explicitly list allowed types for hotplug
Michal Privoznik
mprivozn at redhat.com
Fri Sep 23 14:13:30 UTC 2016
On 23.09.2016 00:47, John Ferlan wrote:
>
>
> On 08/16/2016 11:41 AM, Michal Privoznik wrote:
>> Instead of blindly claim support for hot-plugging of every
>
> claiming
>
>> interface type out there we should copy approach we have for
>> device types: white listing supported types and explicitly error
>> out on unsupported ones.
>> For instance, trying to hotplug vhostuser interface results in
>> nothing usable from guest currently. vhostuser typed interfaces
>> require additional work on our side.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>> src/qemu/qemu_hotplug.c | 24 ++++++++++++++++++++++++
>> 1 file changed, 24 insertions(+)
>>
>
> Part of me thinks - sure ACK this, but the other part says why not
> convert the "if - elseif - elseif" a few lines below to be essentially
> this switch?
>
> Then I wonder if Coverity would pick up on the HOSTDEV specific if and
> "flag" the switch case HOSTDEV: and complain?
>
> What would be the drawback to the switch option?
Good point, this could work. I'm gonna try this.
Michal
More information about the libvir-list
mailing list