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

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

 



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@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


[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]