On 09/11/2012 09:05 PM, Osier Yang wrote:
>>> +
>>> +if (VIR_ALLOC_N(names, count)< 0) {
>>> +virReportOOMError();
>>> +return -1;
>>> +}
>>
>>
>> If you want to check for a race here, you could allocate count+1 items
>> in the array, then do an ncf_list_interfaces telling
On 2012年09月11日 01:29, Laine Stump wrote:
On 09/04/2012 12:10 PM, Osier Yang wrote:
This is not that ideal as API for other objects, as it's still
O(n).
That part I don't see as a big issue, since the number of interfaces
isn't generally large enough to have any significant impact :-)
Becau
On 09/04/2012 12:10 PM, Osier Yang wrote:
> This is not that ideal as API for other objects, as it's still
> O(n).
That part I don't see as a big issue, since the number of interfaces
isn't generally large enough to have any significant impact :-)
> Because interface driver uses netcf APIs to ma
This is not that ideal as API for other objects, as it's still
O(n). Because interface driver uses netcf APIs to manage the
stuffs, instead of by itself. And netcf APIs don't return a object.
It provides APIs like old libvirt APIs:
ncf_number_of_interfaces
ncf_list_interfaces
ncf_lookup_b