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

Re: [libvirt] [libvirt-glib] Add docs for gvir_config_domain_set/get_memory



Hey,

On Tue, Jan 03, 2012 at 10:09:30PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> 
> Its not obvious what units these functions deal with so docs are
> critical for these functions.
> ---
>  libvirt-gconfig/libvirt-gconfig-domain.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
> index 3261755..c20dee8 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain.c
> @@ -196,12 +196,25 @@ void gvir_config_domain_set_name(GVirConfigDomain *domain, const char *name)
>      g_object_notify(G_OBJECT(domain), "name");
>  }
>  
> +/**
> + * gvir_config_domain_get_memory:
> + * @domain: A domain configuration object.
> + *
> + * Returns: amount of RAM, in kilobytes.
> + */

I'd do the same as
http://libvirt.org/formatdomain.html#elementsMemoryAllocation and say:
"Returns: amount of RAM in kilobytes (i.e. blocks of 1024 bytes)"

>  guint64 gvir_config_domain_get_memory(GVirConfigDomain *domain)
>  {
>      return gvir_config_object_get_node_content_uint64(GVIR_CONFIG_OBJECT(domain),
>                                                        "memory");
>  }
>  
> +/**
> + * gvir_config_domain_set_memory:
> + * @domain: A domain configuration object.
> + * @memory: The amount of RAM.

The amount of RAM in kilobytes.

> + *
> + * Sets the amount of RAM allocated to @domain, in kilobytes.

And I'd append "i.e. blocks of 1024 bytes" here too.

ACK with these changes squashed in.

Christophe

Attachment: pgpUpEKHBKD4l.pgp
Description: PGP signature


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