Re: [PATCH] esx: Fix and improve esxListAllDomains function

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

 



2012/9/9 Matthias Bolte <matthias.bolte@xxxxxxxxxxxxxx>:
> Avoid requesting information such as identity or power state when it
> is not necessary.
>
> Lookup virtual machine list with the required fields (configStatus,
> name, and config.uuid) to make esxVI_GetVirtualMachineIdentity work.
>
> No need to call esxVI_GetNumberOfSnapshotTrees. rootSnapshotTreeList
> can be tested for emptiness by checking it for NULL.
>
> esxVI_LookupRootSnapshotTreeList already does the error reporting,
> don't overwrite it.
>
> Check if autostart is enabled at all before looking up the individual
> autostart setting of a virtual machine.
>
> Reorder VIR_EXPAND_N(doms, ndoms, 1) to avoid leaking the result of
> the call to virGetDomain if VIR_EXPAND_N fails.
>
> If virGetDomain fails it already reports an error, don't overwrite it
> with an OOM error.
>
> All items in doms up to the count-th one are valid, no need to double
> check before freeing them.
>
> Finally, don't leak autoStartDefaults and powerInfoList.
> ---
>  src/esx/esx_driver.c |  116 ++++++++++++++++++++++++++++++++-----------------
>  1 files changed, 76 insertions(+), 40 deletions(-)

I replaced this patch by this one

https://www.redhat.com/archives/libvir-list/2012-September/msg00486.html

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]