[Libvir] [Patch 2/4]: Xen inactive domains: hash file

Daniel Veillard veillard at redhat.com
Mon Sep 4 09:15:20 UTC 2006


On Mon, Sep 04, 2006 at 01:33:01AM +0100, Daniel P. Berrange wrote:
> The management of inactive domains uses the hashtable APIs for managing its
> list of config files. In doing so it needed some extra capabilities. This
> patch adds 3 new routines:
> 
>  -  virHashForEach - iterate over all values in the hashtable invoking a 
>                     callback for each one. Modifying the hashtable from
>                      the callback is forbidden, or bad stuff will happen.
> 
>  - virHashRemoteSet - iterate over all values in the hashtable invoking a
>                       callback for each one. If the callback returns non
>                       zero, the element will be removed. 

  Okay, I was suprized by the name virHashRemoteSet but it's actually
virHashRemoveSet so it all make sense.

>  - virHashSearch  - iterate over all values in the hashtable invoking a
>                     callback for each one. The first entry for which the
>                     callback returnbs non-zero will be returned.
> 

  I don't know if I should be pedantice about the presence of the function
comments, on one hand it may feel like a tedious routine at time but I
still like having those for long term maintenance. If needed I will just
add them myself when I have recovered my brain ( okay I open the door wide
to smart criticism:-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list