[libvirt] [PATCH v4 01/13] Adding structure and defines for virDomainSet/GetMemoryParameters
Daniel Veillard
veillard at redhat.com
Tue Oct 12 13:46:50 UTC 2010
On Fri, Oct 08, 2010 at 05:44:48PM +0530, Nikunj A. Dadhania wrote:
> From: Nikunj A. Dadhania <nikunj at linux.vnet.ibm.com>
>
> This patch adds a structure virMemoryParameter, it contains the name of the
> parameter and the type of the parameter along with a union.
>
> v4:
> + Add unsigned int flags to the public api for future extensions
>
> v3:
> + Protoype for virDomainGetMemoryParameters and dummy python binding.
>
> v2:
> + Includes dummy python bindings for the library to build cleanly.
> + Define string constants like "hard_limit", etc.
> + re-order this patch.
Okay, looks fine except :
> +/**
> + * virDomainMemoryParameterType:
> + *
> + * A memory parameter field type
> + */
> +typedef enum {
> + VIR_DOMAIN_MEMORY_FIELD_INT = 1, /* integer case */
> + VIR_DOMAIN_MEMORY_FIELD_UINT = 2, /* unsigned integer case */
> + VIR_DOMAIN_MEMORY_FIELD_LLONG = 3, /* long long case */
> + VIR_DOMAIN_MEMORY_FIELD_ULLONG = 4, /* unsigned long long case */
> + VIR_DOMAIN_MEMORY_FIELD_DOUBLE = 5, /* double case */
> + VIR_DOMAIN_MEMORY_FIELD_BOOLEAN = 6 /* boolean(character) case */
> +} virMemoryParameterType;
I'm renaming those to VIR_DOMAIN_MEMORY_PARAM_INT ... the 'field'
is not an important information, but the fact it's a memory parameter
type is the important point.
[...]
> +typedef virMemoryParameter *virMemoryParameterPtr;
> +
> +/* Set memory tunables for the domain*/
> +int virDomainSetMemoryParameters(virDomainPtr domain,
> + virMemoryParameterPtr params,
> + int nparams, unsigned int flags);
> +int virDomainGetMemoryParameters(virDomainPtr domain,
> + virMemoryParameterPtr params,
> + int *nparams, unsigned int flags);
I also removed tabs here, we don't use tabs, please use "make syntax-check"
otherwise looks fine, ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list