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

Re: [libvirt] [libvirt-glib v2 3/8] Setters for CapabilitiesCpuTopology props



On Tue, Jun 26, 2012 at 05:56:15AM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> 
> ---
>  .../libvirt-gconfig-capabilities-cpu-topology.c    |   27 ++++++++++++++++++++
>  .../libvirt-gconfig-capabilities-cpu-topology.h    |    9 +++++++
>  libvirt-gconfig/libvirt-gconfig.sym                |    3 +++
>  3 files changed, 39 insertions(+)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
> index f34a4fe..bd46a0e 100644
> --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
> +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
> @@ -85,6 +85,15 @@ gvir_config_capabilities_cpu_topology_get_sockets(GVirConfigCapabilitiesCpuTopol
>                                                     0);
>  }
>  
> +void
> +gvir_config_capabilities_cpu_topology_set_sockets(GVirConfigCapabilitiesCpuTopology *topology,
> +                                                  guint64 sockets)
> +{
> +    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(topology),
> +                                               "sockets", G_TYPE_UINT64, sockets,
> +                                               NULL);
> +}
> +
>  guint64
>  gvir_config_capabilities_cpu_topology_get_cores(GVirConfigCapabilitiesCpuTopology *topology)
>  {
> @@ -96,6 +105,15 @@ gvir_config_capabilities_cpu_topology_get_cores(GVirConfigCapabilitiesCpuTopolog
>                                                     0);
>  }
>  
> +void
> +gvir_config_capabilities_cpu_topology_set_cores(GVirConfigCapabilitiesCpuTopology *topology,
> +                                                guint64 cores)
> +{
> +    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(topology),
> +                                               "cores", G_TYPE_UINT64, cores,
> +                                               NULL);
> +}
> +
>  guint64
>  gvir_config_capabilities_cpu_topology_get_threads(GVirConfigCapabilitiesCpuTopology *topology)
>  {
> @@ -106,3 +124,12 @@ gvir_config_capabilities_cpu_topology_get_threads(GVirConfigCapabilitiesCpuTopol
>                                                     "threads",
>                                                     0);
>  }
> +
> +void
> +gvir_config_capabilities_cpu_topology_set_threads(GVirConfigCapabilitiesCpuTopology *topology,
> +                                                  guint64 threads)
> +{
> +    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(topology),
> +                                               "threads", G_TYPE_UINT64, threads,
> +                                               NULL);
> +}
> diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h
> index b8075a0..c589110 100644
> --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h
> +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h
> @@ -64,10 +64,19 @@ GVirConfigCapabilitiesCpuTopology *
>  gvir_config_capabilities_cpu_topology_new_from_xml(const gchar *xml, GError **error);
>  guint64
>  gvir_config_capabilities_cpu_topology_get_sockets(GVirConfigCapabilitiesCpuTopology *topology);
> +void
> +gvir_config_capabilities_cpu_topology_set_sockets(GVirConfigCapabilitiesCpuTopology *topology,
> +                                                  guint64 sockets);
>  guint64
>  gvir_config_capabilities_cpu_topology_get_cores(GVirConfigCapabilitiesCpuTopology *topology);
> +void
> +gvir_config_capabilities_cpu_topology_set_cores(GVirConfigCapabilitiesCpuTopology *topology,
> +                                                guint64 cores);
>  guint64
>  gvir_config_capabilities_cpu_topology_get_threads(GVirConfigCapabilitiesCpuTopology *topology);
> +void
> +gvir_config_capabilities_cpu_topology_set_threads(GVirConfigCapabilitiesCpuTopology *topology,
> +                                                  guint64 threads);
>  
>  G_END_DECLS
>  
> diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
> index a7bb65d..9894a3b 100644
> --- a/libvirt-gconfig/libvirt-gconfig.sym
> +++ b/libvirt-gconfig/libvirt-gconfig.sym
> @@ -432,6 +432,9 @@ LIBVIRT_GCONFIG_0.0.10 {
>  
>  	gvir_config_capabilities_cpu_topology_new;
>  	gvir_config_capabilities_cpu_topology_new_from_xml;
> +	gvir_config_capabilities_cpu_topology_set_cores;
> +	gvir_config_capabilities_cpu_topology_set_sockets;
> +	gvir_config_capabilities_cpu_topology_set_threads;
>  } LIBVIRT_GCONFIG_0.0.9;

ACK (still the issue with the section name, but I'm assuming all patches
will get fixed after 1/8 is fixed).

Christophe

Attachment: pgpXE9Lrmaamo.pgp
Description: PGP signature


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