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

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



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 :-)

Daniel

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


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