[Libvirt-cim] [PATCH 1 of 2] Add Modified to the list of available indications in ComputerSystemIndication

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Thu Jan 17 20:56:51 UTC 2008


Jay Gagnon wrote:
> Kaitlin Rupert wrote:
>> Jay Gagnon wrote:
>>>                  }
>>>
>>> +                for (i = 0; i < prev_count; i++) {
>>> +                        res = dom_changed(prev_xml[i], cur_xml,
>>> cur_count);
>>> +                        if (res) {
>>> +                                CU_DEBUG("Domain '%s' modified.",
>>> prev_xml[i].uuid);
>>> +                                mod_ind(context, conn, prev_xml[i],
>>> prefix, ns);
>>> +                        }
>>> +                        free_dom_xml(prev_xml[i]);
>>> +                }
>> Would it be worth while to add the contents of this loop with delete
>> indication loop just above?
>>
>>                 for (i = 0; i < prev_count; i++) {
>>                         //Handle delete indication
>>                 }
>>
>> This would prevent us from looping through another time. However, it
>> might make the loop too complex / hard to read...
>>
>>
> I think with that one I'd fall on the "makes the loop more complex" side
> of things.  If it saved us from hitting libvirt an additional time or
> something like that it would be worth it, but I think the total cycles
> saved will be pretty small and I like how each indication has a distinct
> section right now.
> 
Sure that makes sense and is fine by me.

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list