[libvirt] [PATCH v2 1/5] qemu: whitelist valid video types

Cole Robinson crobinso at redhat.com
Wed Aug 30 19:14:40 UTC 2017


On 08/28/2017 03:56 AM, Pavel Hrdina wrote:
> On Sun, Aug 27, 2017 at 11:04:38AM -0400, Cole Robinson wrote:
>> Rather than require an explicit blacklist that needs to be extended
>> for every new VIDEO_TYPE
>>
>> Signed-off-by: Cole Robinson <crobinso at redhat.com>
>> ---
>>  src/qemu/qemu_domain.c | 13 +++++--------
>>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> NACK, we prefer to listing all possible values for typed switch.  It
> forces a contributor to look at all places where that switch is used
> in order to consider whether that place should be updated or not.
> 

This patch isn't necessary anyways, I can drop it and squash this into patch
#2, ACK to that? (if so I'll push after the release)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 8f93018d8..eb058c57c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3017,6 +3017,7 @@ qemuDomainDefValidateVideo(const virDomainDef *def)
         case VIR_DOMAIN_VIDEO_TYPE_XEN:
         case VIR_DOMAIN_VIDEO_TYPE_VBOX:
         case VIR_DOMAIN_VIDEO_TYPE_PARALLELS:
+        case VIR_DOMAIN_VIDEO_TYPE_DEFAULT:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("video type '%s' is not supported with QEMU"),
                            virDomainVideoTypeToString(video->type));




Thanks,
Cole




More information about the libvir-list mailing list