[libvirt] [Qemu-devel] [PATCH v9 6/7] block: Enable qemu_open/close to work with fd sets

Eric Blake eblake at redhat.com
Mon Aug 13 17:13:25 UTC 2012


On 08/13/2012 10:33 AM, Corey Bryant wrote:

>> The only way it could fail is if we are trying to add an fd that is
>> already in the set, or if we don't find mon_fdset; both of which would
>> indicate logic bugs earlier in our program.  Would it be worth asserting
>> that these conditions are impossible, and making this function return
>> void (the addition is always successful if it returns, since g_malloc0
>> aborts rather than failing with ENOMEM)?
> 
> I think what I did in v10 should suffice.  I didn't update
> monitor_fdset_dup_fd_add(), but I did update the calling code.  If the
> call fails then I set errno to EINVAL since (unless there's a bug) the
> only possible error is that the fdset ID was non-existent.
> 
> It makes sense to add the asserts, but at this point I'd like to stick
> with what we have in v10 if that's ok.

The problems of reading my inbox in FIFO order - I see now that v10
landed before my comments on v9 :)  Yes, what you did in v10 is probably
fine.

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120813/6bed0cda/attachment-0001.sig>


More information about the libvir-list mailing list