[Libvir] [Patch 1/4] Xen inactive domains: config file APIs

Daniel Veillard veillard at redhat.com
Mon Sep 4 08:59:58 UTC 2006

On Mon, Sep 04, 2006 at 01:29:55AM +0100, Daniel P. Berrange wrote:
> This patch adds an extra API to the config file management API. This API lets
> you add a new config parameter to the file. Previously you could only modify
> existing values, not define extra ones. It also exposes an API for creating
> a new empty config file record, which is needed if you're creating a brand
> new config file, rathre than processing an existing one.

  Okay it all make sense, I was expecting the SetValue to be the first request
go ahead :-) !

> + * virConfGetValue:

  it's SetValue :-)

> + * @conf: a configuration file handle
> + * @entry: the name of the entry
> + * @value: the new configuration value
> + *
> + * Set (or replace) the value associated to this entry in the configuration
> + * file.
> + *
> + * Returns 0 on success, or -1 on failure. Upon success, the passed in
> + * value will be owned by the conf object & should not be freed. 

  Hum, it's sometimes interesting to get the previous value when doing a set
as a result. Also the need to free only in case of error can lead to problems
I have seen in the past similar API which returned the previous value. I
wonder if such an API would not be more systematic, maybe it's more troubles
than it needs to, and being jet-lag and tired it might be very wrong too :-)


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