[libvirt] [PATCH] Check for NULL in qemu monitor event filter

Eric Blake eblake at redhat.com
Mon Sep 22 18:07:15 UTC 2014


On 09/22/2014 10:26 AM, Ján Tomko wrote:
> On 09/22/2014 05:57 PM, Eric Blake wrote:
>> On 09/22/2014 06:09 AM, Ján Tomko wrote:
>>> When virConnectDomainQemuMonitorEventRegister is called with the
>>> VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX flag,
>>> ignore the flag instead of crashing.
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=1144920
>>> ---
>>>  src/conf/domain_event.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> That's one alternative.  I was thinking more along the lines of
>> forbidding the use of flags with a NULL event string:
>>
> 
> I think ingoring it would be nicer than throwing an error.
> 
> I'm fine with your fix as well, but the error message could be more specific
> (as NULL argument is allowed without the flags).

Thinking more about it: we already document that libvirt-qemu.so is
unsupported, and primarily for developers.  Ignoring an option is
developer-friendly, hard errors require more maintenance effort.  So ACK
to your patch, unless anyone else speaks up strongly in favor of my
variation.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140922/8cde1c45/attachment-0001.sig>


More information about the libvir-list mailing list