[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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

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

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

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]