Re: [libvirt-glib 1/3] Add gvir_config_capabilities_cpu_get_model()

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

 



This is returning a char * 
<capabilities>
  <host>
    <cpu>
      <model>xxx</model>
    </cpu>
  </host>
</capabilities>
while the next patch exposes the model from the /domain/cpu/model node
as an actual object, why the difference?

Christophe

On Fri, Jul 04, 2014 at 02:51:26PM +0100, Zeeshan Ali (Khattak) wrote:
> Add a method to get the model of the CPU from capabilities.
> ---
>  libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 6 ++++++
>  libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h | 2 ++
>  libvirt-gconfig/libvirt-gconfig.sym                | 2 ++
>  3 files changed, 10 insertions(+)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
> index f4753ff..255c4d7 100644
> --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
> +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
> @@ -60,6 +60,12 @@ gvir_config_capabilities_cpu_get_arch(GVirConfigCapabilitiesCpu *cpu)
>      return gvir_config_object_get_node_content(GVIR_CONFIG_OBJECT(cpu), "arch");
>  }
>  
> +const gchar *
> +gvir_config_capabilities_cpu_get_model(GVirConfigCapabilitiesCpu *cpu)
> +{
> +    return gvir_config_object_get_node_content(GVIR_CONFIG_OBJECT(cpu), "model");
> +}
> +
>  /**
>   * gvir_config_capabilities_cpu_add_feature:
>   *
> diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
> index ce3613f..c6c152f 100644
> --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
> +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
> @@ -66,6 +66,8 @@ GType gvir_config_capabilities_cpu_get_type(void);
>  
>  const gchar *
>  gvir_config_capabilities_cpu_get_arch(GVirConfigCapabilitiesCpu *cpu);
> +const gchar *
> +gvir_config_capabilities_cpu_get_model(GVirConfigCapabilitiesCpu *cpu);
>  void gvir_config_capabilities_cpu_add_feature(GVirConfigCapabilitiesCpu *cpu,
>                                                GVirConfigCapabilitiesCpuFeature *feature);
>  GList *
> diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
> index 0d33fdb..86dada6 100644
> --- a/libvirt-gconfig/libvirt-gconfig.sym
> +++ b/libvirt-gconfig/libvirt-gconfig.sym
> @@ -689,6 +689,8 @@ global:
>  
>  LIBVIRT_GCONFIG_0.1.9 {
>  global:
> +	gvir_config_capabilities_cpu_get_model;
> +
>  	gvir_config_capabilities_host_get_secmodels;
>  
>  	gvir_config_capabilities_host_secmodel_get_doi;
> -- 
> 1.9.3
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: pgpM1yh1uB8o9.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

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